Changes in src/tesselation.hpp [7c14ec:7dea7c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.hpp
r7c14ec r7dea7c 34 34 class PointCloud; 35 35 class Tesselation; 36 37 #define DoTecplotOutput 1 38 #define DoRaster3DOutput 1 39 #define DoVRMLOutput 1 40 #define TecplotSuffix ".dat" 41 #define Raster3DSuffix ".r3d" 42 #define VRMLSUffix ".wrl" 36 43 37 44 // ======================================================= some template functions ========================================= … … 115 122 116 123 void GetNormalVector(Vector &NormalVector); 124 void GetCenter(Vector *center); 117 125 bool GetIntersectionInsideTriangle(ofstream *out, Vector *MolCenter, Vector *x, Vector *Intersection); 118 126 bool ContainsBoundaryLine(class BoundaryLineSet *line); 119 127 bool ContainsBoundaryPoint(class BoundaryPointSet *point); 128 bool ContainsBoundaryPoint(class TesselPoint *point); 120 129 class BoundaryPointSet *GetThirdEndpoint(class BoundaryLineSet *line); 121 130 bool IsPresentTupel(class BoundaryPointSet *Points[3]); 122 void GetCenter(Vector *center);131 bool IsPresentTupel(class BoundaryTriangleSet *T); 123 132 124 133 class BoundaryPointSet *endpoints[3]; … … 196 205 void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n); 197 206 void AddTesselationTriangle(); 207 void AddTesselationTriangle(int nr); 198 208 void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle); 199 209 void RemoveTesselationLine(class BoundaryLineSet *line); 200 210 void RemoveTesselationPoint(class BoundaryPointSet *point); 201 211 202 bool IsInside(Vector *pointer);203 212 class BoundaryPointSet *GetCommonEndpoint(class BoundaryLineSet * line1, class BoundaryLineSet * line2); 204 213 205 214 // concave envelope 206 215 void FindStartingTriangle(ofstream *out, const double RADIUS, class LinkedCell *LC); 207 void FindSecondPointForTesselation(class TesselPoint* a, class TesselPoint* Candidate,Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, class LinkedCell *LC);216 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, class LinkedCell *LC); 208 217 void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, class LinkedCell *LC); 209 bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N,LinkedCell *LC);218 bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, LinkedCell *LC); 210 219 int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]); 220 class BoundaryTriangleSet * GetPresentTriangle(ofstream *out, TesselPoint *Candidates[3]); 211 221 212 222 // convex envelope … … 215 225 bool InsertStraddlingPoints(ofstream *out, PointCloud *cloud, LinkedCell *LC); 216 226 double RemovePointFromTesselatedSurface(ofstream *out, class BoundaryPointSet *point); 217 boolFlipBaseline(ofstream *out, class BoundaryLineSet *Base);218 boolPickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);227 class BoundaryLineSet * FlipBaseline(ofstream *out, class BoundaryLineSet *Base); 228 double PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base); 219 229 class BoundaryPointSet *IsConvexRectangle(ofstream *out, class BoundaryLineSet *Base); 220 map<int, int> FindAllDegeneratedTriangles(); 230 map<int, int> * FindAllDegeneratedTriangles(); 231 map<int, int> * FindAllDegeneratedLines(); 221 232 void RemoveDegeneratedTriangles(); 222 223 list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point); 224 list<TesselPoint*> * GetNeighboursOnCircleOfConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference); 233 void AddBoundaryPointByDegeneratedTriangle(ofstream *out, class TesselPoint *point, LinkedCell *LC); 234 235 set<TesselPoint*> * GetAllConnectedPoints(ofstream *out, TesselPoint* Point); 236 set<BoundaryTriangleSet*> *GetAllTriangles(ofstream *out, class BoundaryPointSet *Point); 237 list<list<TesselPoint*> *> * GetPathsOfConnectedPoints(ofstream *out, TesselPoint* Point); 238 list<list<TesselPoint*> *> * GetClosedPathsOfConnectedPoints(ofstream *out, TesselPoint* Point); 239 list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point, Vector *Reference = NULL); 225 240 list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]); 226 241 list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC); … … 229 244 bool IsInnerPoint(ofstream *out, TesselPoint *Point, LinkedCell* LC); 230 245 bool AddBoundaryPoint(TesselPoint *Walker, int n); 246 247 // print for debugging 248 void PrintAllBoundaryPoints(ofstream *out); 249 void PrintAllBoundaryLines(ofstream *out); 250 void PrintAllBoundaryTriangles(ofstream *out); 251 252 // store envelope in file 253 void Output(ofstream *out, const char *filename, PointCloud *cloud); 231 254 232 255 PointMap PointsOnBoundary; … … 251 274 class BoundaryLineSet *BLS[3]; 252 275 class BoundaryTriangleSet *BTS; 276 class BoundaryTriangleSet *LastTriangle; 277 int TriangleFilesWritten; 253 278 254 279 private: … … 258 283 }; 259 284 260 bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3]);261 bool SortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);262 TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);263 TesselPoint* FindSecondClosestPoint(const Vector*, LinkedCell*);264 double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);265 Vector * GetClosestPointBetweenLine(ofstream *out, class BoundaryLineSet *Base, class BoundaryLineSet *OtherBase);266 285 267 286 #endif /* TESSELATION_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.