SpherePackingScenarioGenerator
|
00001 /* 00002 * HardspherePosition.h 00003 * 00004 * Created on: 2011-3-28 00005 * Author: Tan 00006 */ 00007 00008 #ifndef HardspherePosition_H_ 00009 #define HardspherePosition_H_ 00010 00011 #include <iomanip> 00012 #include <iostream> 00013 #include <stdio.h> 00014 #include <fstream> 00015 #include <vector> 00016 #include <string> 00017 #include <sstream> 00018 #include "regularpacking/RegularPacking.h" 00019 00020 namespace algorithms { 00021 class HardspherePosition; 00022 } 00023 00028 class algorithms::HardspherePosition { 00029 public: 00033 HardspherePosition(); 00037 virtual ~HardspherePosition(); 00042 void Randomsphere(std::string filename); 00047 void Regularsphere(regularpacking::RegularPacking Packing); 00079 void GhostSphere(std::string filename); 00084 double GetNumber(); 00090 double GetPositionX(int k); 00096 double GetPositionY(int k); 00102 double GetPositionZ(int k); 00107 double GetRadius(); 00112 double GetLength(); 00116 void GetPosition(); 00120 void Print(); 00125 double* GetPositionsAsArray(); 00132 void AddGhostSphere(double x,double y,double z); 00133 private: 00134 std::vector <double> _positionx;//position of spheres in x axle 00135 std::vector <double> _positiony;//position of spheres in y axle 00136 std::vector <double> _positionz;//position of spheres in z axle 00137 std::vector <double> _sphereCoordinateVector;//position of spheres in special format 00138 double length;//length of the edge 00139 double radius;//radius 00140 std::string line; 00141 }; 00142 00143 #endif /* HardspherePosition_H_ */