Changes in src/tesselation.hpp [7c14ec:f66195]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.hpp
r7c14ec rf66195 13 13 using namespace std; 14 14 15 /*********************************************** includes ***********************************/ 16 15 17 // include config.h 16 18 #ifdef HAVE_CONFIG_H … … 22 24 #include <set> 23 25 24 25 #include "helpers.hpp"26 #include "linkedcell.hpp"27 #include "tesselationhelpers.hpp"28 26 #include "vector.hpp" 27 28 /****************************************** forward declarations *****************************/ 29 29 30 30 class BoundaryPointSet; 31 31 class BoundaryLineSet; 32 32 class BoundaryTriangleSet; 33 class LinkedCell; 33 34 class TesselPoint; 34 35 class PointCloud; 35 36 class Tesselation; 37 38 /********************************************** definitions *********************************/ 39 40 #define DoTecplotOutput 1 41 #define DoRaster3DOutput 1 42 #define DoVRMLOutput 1 43 #define TecplotSuffix ".dat" 44 #define Raster3DSuffix ".r3d" 45 #define VRMLSUffix ".wrl" 36 46 37 47 // ======================================================= some template functions ========================================= … … 53 63 #define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> > 54 64 55 65 /********************************************** declarations *******************************/ 56 66 57 67 template <typename T> void SetEndpointsOrdered(T endpoints[2], T endpoint1, T endpoint2) … … 115 125 116 126 void GetNormalVector(Vector &NormalVector); 127 void GetCenter(Vector *center); 117 128 bool GetIntersectionInsideTriangle(ofstream *out, Vector *MolCenter, Vector *x, Vector *Intersection); 118 129 bool ContainsBoundaryLine(class BoundaryLineSet *line); 119 130 bool ContainsBoundaryPoint(class BoundaryPointSet *point); 131 bool ContainsBoundaryPoint(class TesselPoint *point); 120 132 class BoundaryPointSet *GetThirdEndpoint(class BoundaryLineSet *line); 121 133 bool IsPresentTupel(class BoundaryPointSet *Points[3]); 122 void GetCenter(Vector *center);134 bool IsPresentTupel(class BoundaryTriangleSet *T); 123 135 124 136 class BoundaryPointSet *endpoints[3]; … … 196 208 void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n); 197 209 void AddTesselationTriangle(); 210 void AddTesselationTriangle(int nr); 198 211 void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle); 199 212 void RemoveTesselationLine(class BoundaryLineSet *line); 200 213 void RemoveTesselationPoint(class BoundaryPointSet *point); 201 214 202 bool IsInside(Vector *pointer);203 215 class BoundaryPointSet *GetCommonEndpoint(class BoundaryLineSet * line1, class BoundaryLineSet * line2); 204 216 205 217 // concave envelope 206 218 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);219 void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, class LinkedCell *LC); 208 220 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);221 bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, LinkedCell *LC); 210 222 int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]); 223 class BoundaryTriangleSet * GetPresentTriangle(ofstream *out, TesselPoint *Candidates[3]); 211 224 212 225 // convex envelope … … 215 228 bool InsertStraddlingPoints(ofstream *out, PointCloud *cloud, LinkedCell *LC); 216 229 double RemovePointFromTesselatedSurface(ofstream *out, class BoundaryPointSet *point); 217 boolFlipBaseline(ofstream *out, class BoundaryLineSet *Base);218 boolPickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);230 class BoundaryLineSet * FlipBaseline(ofstream *out, class BoundaryLineSet *Base); 231 double PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base); 219 232 class BoundaryPointSet *IsConvexRectangle(ofstream *out, class BoundaryLineSet *Base); 220 map<int, int> FindAllDegeneratedTriangles(); 233 map<int, int> * FindAllDegeneratedTriangles(); 234 map<int, int> * FindAllDegeneratedLines(); 221 235 void RemoveDegeneratedTriangles(); 222 223 list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point); 224 list<TesselPoint*> * GetNeighboursOnCircleOfConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference); 236 void AddBoundaryPointByDegeneratedTriangle(ofstream *out, class TesselPoint *point, LinkedCell *LC); 237 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); 225 243 list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]); 226 244 list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC); … … 229 247 bool IsInnerPoint(ofstream *out, TesselPoint *Point, LinkedCell* LC); 230 248 bool AddBoundaryPoint(TesselPoint *Walker, int n); 249 250 // print for debugging 251 void PrintAllBoundaryPoints(ofstream *out); 252 void PrintAllBoundaryLines(ofstream *out); 253 void PrintAllBoundaryTriangles(ofstream *out); 254 255 // store envelope in file 256 void Output(ofstream *out, const char *filename, PointCloud *cloud); 231 257 232 258 PointMap PointsOnBoundary; … … 251 277 class BoundaryLineSet *BLS[3]; 252 278 class BoundaryTriangleSet *BTS; 279 class BoundaryTriangleSet *LastTriangle; 280 int TriangleFilesWritten; 253 281 254 282 private: … … 258 286 }; 259 287 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 288 267 289 #endif /* TESSELATION_HPP_ */
Note:
See TracChangeset
for help on using the changeset viewer.