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