Changeset 1b2aa1 for molecuilder/src/boundary.hpp
- Timestamp:
- Jul 23, 2009, 12:14:13 PM (16 years ago)
- Children:
- f39735
- Parents:
- a41b50
- File:
-
- 1 edited
-
molecuilder/src/boundary.hpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/boundary.hpp
ra41b50 r1b2aa1 27 27 template <typename T> void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2) 28 28 { 29 if (endpoint1->Nr < endpoint2->Nr) {30 endpoints[0] = endpoint1;31 endpoints[1] = endpoint2;32 } else {33 endpoints[0] = endpoint2;34 endpoints[1] = endpoint1;35 }29 if (endpoint1->Nr < endpoint2->Nr) { 30 endpoints[0] = endpoint1; 31 endpoints[1] = endpoint2; 32 } else { 33 endpoints[0] = endpoint2; 34 endpoints[1] = endpoint1; 35 } 36 36 }; 37 37 38 38 class BoundaryPointSet { 39 public:40 BoundaryPointSet();41 BoundaryPointSet(atom *Walker);42 ~BoundaryPointSet();39 public: 40 BoundaryPointSet(); 41 BoundaryPointSet(atom *Walker); 42 ~BoundaryPointSet(); 43 43 44 void AddLine(class BoundaryLineSet *line);44 void AddLine(class BoundaryLineSet *line); 45 45 46 LineMap lines;47 int LinesCount;48 atom *node;49 int Nr;46 LineMap lines; 47 int LinesCount; 48 atom *node; 49 int Nr; 50 50 }; 51 51 52 52 class BoundaryLineSet { 53 public:54 BoundaryLineSet();55 BoundaryLineSet(class BoundaryPointSet *Point[2], int number);56 ~BoundaryLineSet();53 public: 54 BoundaryLineSet(); 55 BoundaryLineSet(class BoundaryPointSet *Point[2], int number); 56 ~BoundaryLineSet(); 57 57 58 void AddTriangle(class BoundaryTriangleSet *triangle);58 void AddTriangle(class BoundaryTriangleSet *triangle); 59 59 60 class BoundaryPointSet *endpoints[2];61 TriangleMap triangles;62 int TrianglesCount;63 int Nr;60 class BoundaryPointSet *endpoints[2]; 61 TriangleMap triangles; 62 int TrianglesCount; 63 int Nr; 64 64 }; 65 65 66 66 class BoundaryTriangleSet { 67 public:68 BoundaryTriangleSet();69 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number);70 ~BoundaryTriangleSet();67 public: 68 BoundaryTriangleSet(); 69 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number); 70 ~BoundaryTriangleSet(); 71 71 72 void GetNormalVector(Vector &NormalVector);72 void GetNormalVector(Vector &NormalVector); 73 73 74 class BoundaryPointSet *endpoints[3];75 class BoundaryLineSet *lines[3];76 Vector NormalVector;77 int Nr;74 class BoundaryPointSet *endpoints[3]; 75 class BoundaryLineSet *lines[3]; 76 Vector NormalVector; 77 int Nr; 78 78 }; 79 79 80 80 class Tesselation { 81 public:81 public: 82 82 83 Tesselation();84 ~Tesselation();83 Tesselation(); 84 ~Tesselation(); 85 85 86 void TesselateOnBoundary(ofstream *out, config *configuration, molecule *mol);87 void GuessStartingTriangle(ofstream *out);88 void AddPoint(atom * Walker);89 void AddTrianglePoint(atom* Candidate, int n);90 void AddTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);91 void AddTriangleToLines();92 void Find_starting_triangle(ofstream *out, molecule* mol, const double RADIUS, LinkedCell *LC);93 bool Find_next_suitable_triangle(ofstream *out, molecule* mol, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, const char *filename, LinkedCell *LC);94 bool CheckPresenceOfTriangle(ofstream *out, atom *Candidates[3]);95 void Find_next_suitable_point_via_Angle_of_Sphere(atom* a, atom* b, atom* c, atom* Candidate, atom* Parent, int RecursionLevel, Vector *Chord, Vector *direction1, Vector *OldNormal, Vector ReferencePoint, atom*& Opt_Candidate, double *Storage, const double RADIUS, molecule* mol);86 void TesselateOnBoundary(ofstream *out, config *configuration, molecule *mol); 87 void GuessStartingTriangle(ofstream *out); 88 void AddPoint(atom * Walker); 89 void AddTrianglePoint(atom* Candidate, int n); 90 void AddTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n); 91 void AddTriangleToLines(); 92 void Find_starting_triangle(ofstream *out, molecule* mol, const double RADIUS, LinkedCell *LC); 93 bool Find_next_suitable_triangle(ofstream *out, molecule* mol, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, const char *filename, LinkedCell *LC); 94 bool CheckPresenceOfTriangle(ofstream *out, atom *Candidates[3]); 95 void Find_next_suitable_point_via_Angle_of_Sphere(atom* a, atom* b, atom* c, atom* Candidate, atom* Parent, int RecursionLevel, Vector *Chord, Vector *direction1, Vector *OldNormal, Vector ReferencePoint, atom*& Opt_Candidate, double *Storage, const double RADIUS, molecule* mol); 96 96 97 PointMap PointsOnBoundary;98 LineMap LinesOnBoundary;99 TriangleMap TrianglesOnBoundary;100 class BoundaryPointSet *TPS[3]; //this is a Storage for pointers to triangle points, this and BPS[2] needed due to AddLine restrictions101 class BoundaryPointSet *BPS[2];102 class BoundaryLineSet *BLS[3];103 class BoundaryTriangleSet *BTS;104 int PointsOnBoundaryCount;105 int LinesOnBoundaryCount;106 int TrianglesOnBoundaryCount;107 int TriangleFilesWritten;97 PointMap PointsOnBoundary; 98 LineMap LinesOnBoundary; 99 TriangleMap TrianglesOnBoundary; 100 class BoundaryPointSet *TPS[3]; //this is a Storage for pointers to triangle points, this and BPS[2] needed due to AddLine restrictions 101 class BoundaryPointSet *BPS[2]; 102 class BoundaryLineSet *BLS[3]; 103 class BoundaryTriangleSet *BTS; 104 int PointsOnBoundaryCount; 105 int LinesOnBoundaryCount; 106 int TrianglesOnBoundaryCount; 107 int TriangleFilesWritten; 108 108 }; 109 109
Note:
See TracChangeset
for help on using the changeset viewer.
