Changeset a9b2a0a for molecuilder/src/tesselation.hpp
- Timestamp:
- Oct 27, 2009, 4:11:22 PM (16 years ago)
- Children:
- 069034
- Parents:
- 55a71b
- File:
-
- 1 edited
-
molecuilder/src/tesselation.hpp (modified) (10 diffs)
Legend:
- Unmodified
- Added
- Removed
-
molecuilder/src/tesselation.hpp
r55a71b ra9b2a0a 83 83 public: 84 84 BoundaryPointSet(); 85 BoundaryPointSet(TesselPoint * Walker);85 BoundaryPointSet(TesselPoint * Walker); 86 86 ~BoundaryPointSet(); 87 87 … … 95 95 }; 96 96 97 ostream & operator << (ostream &ost, BoundaryPointSet &a);97 ostream & operator << (ostream &ost, const BoundaryPointSet &a); 98 98 99 99 // ======================================================== class BoundaryLineSet ========================================== … … 102 102 public: 103 103 BoundaryLineSet(); 104 BoundaryLineSet(class BoundaryPointSet *Point[2], int number);104 BoundaryLineSet(class BoundaryPointSet *Point[2], const int number); 105 105 ~BoundaryLineSet(); 106 106 … … 116 116 }; 117 117 118 ostream & operator << (ostream &ost, BoundaryLineSet &a);118 ostream & operator << (ostream &ost, const BoundaryLineSet &a); 119 119 120 120 // ======================================================== class BoundaryTriangleSet ======================================= … … 142 142 }; 143 143 144 ostream & operator << (ostream &ost, BoundaryTriangleSet &a);144 ostream & operator << (ostream &ost, const BoundaryTriangleSet &a); 145 145 146 146 // =========================================================== class TESSELPOINT =========================================== … … 170 170 virtual ~PointCloud(); 171 171 172 virtual Vector *GetCenter(ofstream *out) { return NULL; };173 virtual TesselPoint *GetPoint() { return NULL; };174 virtual TesselPoint *GetTerminalPoint() { return NULL; };175 virtual void GoToNext() {};176 virtual void GoToPrevious() {};177 virtual void GoToFirst() {};178 virtual void GoToLast() {};179 virtual bool IsEmpty() { return false; };180 virtual bool IsEnd() { return false; };172 virtual Vector *GetCenter(ofstream *out) const { return NULL; }; 173 virtual TesselPoint *GetPoint() const { return NULL; }; 174 virtual TesselPoint *GetTerminalPoint() const { return NULL; }; 175 virtual void GoToNext() const {}; 176 virtual void GoToPrevious() const {}; 177 virtual void GoToFirst() const {}; 178 virtual void GoToLast() const {}; 179 virtual bool IsEmpty() const { return false; }; 180 virtual bool IsEnd() const { return false; }; 181 181 }; 182 182 … … 204 204 virtual ~Tesselation(); 205 205 206 void AddTesselationPoint(TesselPoint* Candidate, int n);207 void AddTesselationLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);208 void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);206 void AddTesselationPoint(TesselPoint* Candidate, const int n); 207 void AddTesselationLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n); 208 void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n); 209 209 void AddTesselationTriangle(); 210 void AddTesselationTriangle( int nr);210 void AddTesselationTriangle(const int nr); 211 211 void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle); 212 212 void RemoveTesselationLine(class BoundaryLineSet *line); 213 213 void RemoveTesselationPoint(class BoundaryPointSet *point); 214 214 215 class BoundaryPointSet *GetCommonEndpoint(class BoundaryLineSet * line1, class BoundaryLineSet * line2);216 215 217 216 // concave envelope 218 void FindStartingTriangle(ofstream *out, const double RADIUS, c lassLinkedCell *LC);219 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, c lassLinkedCell *LC);220 void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, c lassLinkedCell *LC);221 bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, LinkedCell *LC);217 void FindStartingTriangle(ofstream *out, const double RADIUS, const LinkedCell *LC); 218 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC); 219 void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, const LinkedCell *LC); 220 bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC); 222 221 int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]); 223 222 class BoundaryTriangleSet * GetPresentTriangle(ofstream *out, TesselPoint *Candidates[3]); 224 223 225 224 // convex envelope 226 void TesselateOnBoundary(ofstream *out, PointCloud *cloud);225 void TesselateOnBoundary(ofstream *out, const PointCloud * const cloud); 227 226 void GuessStartingTriangle(ofstream *out); 228 bool InsertStraddlingPoints(ofstream *out, PointCloud *cloud,LinkedCell *LC);227 bool InsertStraddlingPoints(ofstream *out, const PointCloud *cloud, const LinkedCell *LC); 229 228 double RemovePointFromTesselatedSurface(ofstream *out, class BoundaryPointSet *point); 230 229 class BoundaryLineSet * FlipBaseline(ofstream *out, class BoundaryLineSet *Base); … … 236 235 void AddBoundaryPointByDegeneratedTriangle(ofstream *out, class TesselPoint *point, LinkedCell *LC); 237 236 238 set<TesselPoint*> * GetAllConnectedPoints(ofstream *out, TesselPoint* Point); 239 set<BoundaryTriangleSet*> *GetAllTriangles(ofstream *out, class BoundaryPointSet *Point); 240 list<list<TesselPoint*> *> * GetPathsOfConnectedPoints(ofstream *out, TesselPoint* Point); 241 list<list<TesselPoint*> *> * GetClosedPathsOfConnectedPoints(ofstream *out, TesselPoint* Point); 242 list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point, Vector *Reference = NULL); 243 list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]); 244 list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC); 245 class BoundaryTriangleSet * FindClosestTriangleToPoint(ofstream *out, Vector *x, LinkedCell* LC); 246 bool IsInnerPoint(ofstream *out, Vector Point, LinkedCell* LC); 247 bool IsInnerPoint(ofstream *out, TesselPoint *Point, LinkedCell* LC); 248 bool AddBoundaryPoint(TesselPoint *Walker, int n); 237 set<TesselPoint*> * GetAllConnectedPoints(ofstream *out, const TesselPoint* const Point) const; 238 set<BoundaryTriangleSet*> *GetAllTriangles(ofstream *out, const BoundaryPointSet * const Point) const; 239 list<list<TesselPoint*> *> * GetPathsOfConnectedPoints(ofstream *out, const TesselPoint* const Point) const; 240 list<list<TesselPoint*> *> * GetClosedPathsOfConnectedPoints(ofstream *out, const TesselPoint* const Point) const; 241 list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, const TesselPoint* const Point, const Vector * const Reference = NULL) const; 242 class BoundaryPointSet *GetCommonEndpoint(const BoundaryLineSet * line1, const BoundaryLineSet * line2) const; 243 list<BoundaryTriangleSet*> *FindTriangles(const TesselPoint* const Points[3]) const; 244 list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, const Vector *x, const LinkedCell* LC) const; 245 class BoundaryTriangleSet * FindClosestTriangleToPoint(ofstream *out, const Vector *x, const LinkedCell* LC) const; 246 bool IsInnerPoint(ofstream *out, const Vector &Point, const LinkedCell* const LC) const; 247 bool IsInnerPoint(ofstream *out, const TesselPoint * const Point, const LinkedCell* const LC) const; 248 bool AddBoundaryPoint(TesselPoint * Walker, const int n); 249 249 250 250 // print for debugging 251 void PrintAllBoundaryPoints(ofstream *out) ;252 void PrintAllBoundaryLines(ofstream *out) ;253 void PrintAllBoundaryTriangles(ofstream *out) ;251 void PrintAllBoundaryPoints(ofstream *out) const; 252 void PrintAllBoundaryLines(ofstream *out) const; 253 void PrintAllBoundaryTriangles(ofstream *out) const; 254 254 255 255 // store envelope in file 256 void Output(ofstream *out, const char *filename, PointCloud *cloud);256 void Output(ofstream *out, const char *filename, const PointCloud * const cloud); 257 257 258 258 PointMap PointsOnBoundary; … … 264 264 265 265 // PointCloud implementation for PointsOnBoundary 266 virtual Vector *GetCenter(ofstream *out) ;267 virtual TesselPoint *GetPoint() ;268 virtual TesselPoint *GetTerminalPoint() ;269 virtual void GoToNext() ;270 virtual void GoToPrevious() ;271 virtual void GoToFirst() ;272 virtual void GoToLast() ;273 virtual bool IsEmpty() ;274 virtual bool IsEnd() ;266 virtual Vector *GetCenter(ofstream *out) const; 267 virtual TesselPoint *GetPoint() const; 268 virtual TesselPoint *GetTerminalPoint() const; 269 virtual void GoToNext() const; 270 virtual void GoToPrevious() const; 271 virtual void GoToFirst() const; 272 virtual void GoToLast() const; 273 virtual bool IsEmpty() const; 274 virtual bool IsEnd() const; 275 275 276 276 class BoundaryPointSet *BPS[2]; … … 283 283 class BoundaryPointSet *TPS[3]; //this is a Storage for pointers to triangle points, this and BPS[2] needed due to AddLine restrictions 284 284 285 PointMap::iterator InternalPointer;285 mutable PointMap::const_iterator InternalPointer; 286 286 }; 287 287
Note:
See TracChangeset
for help on using the changeset viewer.
