Changes in src/tesselation.hpp [125b3c:244a84]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.hpp
r125b3c r244a84 52 52 // ======================================================= some template functions ========================================= 53 53 54 #define IndexToIndex map <int, int> 55 54 56 #define PointMap map < int, class BoundaryPointSet * > 55 57 #define PointSet set < class BoundaryPointSet * > … … 77 79 #define PolygonList list < class BoundaryPolygonSet * > 78 80 81 #define DistanceToPointMap multimap <double, class BoundaryPointSet * > 82 #define DistanceToPointPair pair <double, class BoundaryPointSet * > 83 79 84 #define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> > 80 85 #define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> > … … 82 87 #define TesselPointList list <TesselPoint *> 83 88 #define TesselPointSet set <TesselPoint *> 89 90 #define ListOfTesselPointList list<list <TesselPoint *> *> 84 91 85 92 /********************************************** declarations *******************************/ … … 101 108 public: 102 109 BoundaryPointSet(); 103 BoundaryPointSet(TesselPoint * Walker);110 BoundaryPointSet(TesselPoint * const Walker); 104 111 ~BoundaryPointSet(); 105 112 106 void AddLine( class BoundaryLineSet *line);113 void AddLine(BoundaryLineSet * const line); 107 114 108 115 LineMap lines; … … 120 127 public: 121 128 BoundaryLineSet(); 122 BoundaryLineSet(class BoundaryPointSet *Point[2], const int number); 129 BoundaryLineSet(BoundaryPointSet * const Point[2], const int number); 130 BoundaryLineSet(BoundaryPointSet * const Point1, BoundaryPointSet * const Point2, const int number); 123 131 ~BoundaryLineSet(); 124 132 125 void AddTriangle( class BoundaryTriangleSet *triangle);126 bool IsConnectedTo(c lass BoundaryLineSet *line);127 bool ContainsBoundaryPoint(c lass BoundaryPointSet *point);128 bool CheckConvexityCriterion() ;129 class BoundaryPointSet *GetOtherEndpoint(c lass BoundaryPointSet *);133 void AddTriangle(BoundaryTriangleSet * const triangle); 134 bool IsConnectedTo(const BoundaryLineSet * const line) const; 135 bool ContainsBoundaryPoint(const BoundaryPointSet * const point) const; 136 bool CheckConvexityCriterion() const; 137 class BoundaryPointSet *GetOtherEndpoint(const BoundaryPointSet * const point) const; 130 138 131 139 class BoundaryPointSet *endpoints[2]; … … 142 150 public: 143 151 BoundaryTriangleSet(); 144 BoundaryTriangleSet(class BoundaryLineSet * line[3],int number);152 BoundaryTriangleSet(class BoundaryLineSet * const line[3], const int number); 145 153 ~BoundaryTriangleSet(); 146 154 147 void GetNormalVector(Vector &NormalVector); 148 void GetCenter(Vector *center); 149 bool GetIntersectionInsideTriangle(Vector *MolCenter, Vector *x, Vector *Intersection); 150 bool ContainsBoundaryLine(class BoundaryLineSet *line); 151 bool ContainsBoundaryPoint(class BoundaryPointSet *point); 152 bool ContainsBoundaryPoint(class TesselPoint *point); 153 class BoundaryPointSet *GetThirdEndpoint(class BoundaryLineSet *line); 154 bool IsPresentTupel(class BoundaryPointSet *Points[3]); 155 bool IsPresentTupel(class BoundaryTriangleSet *T); 155 void GetNormalVector(const Vector &NormalVector); 156 void GetCenter(Vector * const center) const; 157 bool GetIntersectionInsideTriangle(const Vector * const MolCenter, const Vector * const x, Vector * const Intersection) const; 158 double GetClosestPointInsideTriangle(const Vector * const x, Vector * const ClosestPoint) const; 159 bool ContainsBoundaryLine(const BoundaryLineSet * const line) const; 160 bool ContainsBoundaryPoint(const BoundaryPointSet * const point) const; 161 bool ContainsBoundaryPoint(const TesselPoint * const point) const; 162 class BoundaryPointSet *GetThirdEndpoint(const BoundaryLineSet * const line) const; 163 bool IsPresentTupel(const BoundaryPointSet * const Points[3]) const; 164 bool IsPresentTupel(const BoundaryTriangleSet * const T) const; 156 165 157 166 class BoundaryPointSet *endpoints[3]; … … 226 235 virtual TesselPoint *GetPoint() const { return NULL; }; 227 236 virtual TesselPoint *GetTerminalPoint() const { return NULL; }; 237 virtual int GetMaxId() const { return 0; }; 228 238 virtual void GoToNext() const {}; 229 239 virtual void GoToPrevious() const {}; … … 290 300 double PickFarthestofTwoBaselines(class BoundaryLineSet *Base); 291 301 class BoundaryPointSet *IsConvexRectangle(class BoundaryLineSet *Base); 292 map<int, int>* FindAllDegeneratedTriangles();293 map<int, int>* FindAllDegeneratedLines();302 IndexToIndex * FindAllDegeneratedTriangles(); 303 IndexToIndex * FindAllDegeneratedLines(); 294 304 void RemoveDegeneratedTriangles(); 295 305 void AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell *LC); 296 306 int CorrectAllDegeneratedPolygons(); 297 307 298 set<TesselPoint*> * GetAllConnectedPoints(const TesselPoint* const Point) const; 299 set<BoundaryTriangleSet*> *GetAllTriangles(const BoundaryPointSet * const Point) const; 300 list<list<TesselPoint*> *> * GetPathsOfConnectedPoints(const TesselPoint* const Point) const; 301 list<list<TesselPoint*> *> * GetClosedPathsOfConnectedPoints(const TesselPoint* const Point) const; 302 list<TesselPoint*> * GetCircleOfSetOfPoints(set<TesselPoint*> *SetOfNeighbours, const TesselPoint* const Point, const Vector * const Reference = NULL) const; 303 class BoundaryPointSet *GetCommonEndpoint(const BoundaryLineSet * line1, const BoundaryLineSet * line2) const; 304 list<BoundaryTriangleSet*> *FindTriangles(const TesselPoint* const Points[3]) const; 305 list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(const Vector *x, const LinkedCell* LC) const; 306 class BoundaryTriangleSet * FindClosestTriangleToPoint(const Vector *x, const LinkedCell* LC) const; 308 TesselPointSet * GetAllConnectedPoints(const TesselPoint* const Point) const; 309 TriangleSet * GetAllTriangles(const BoundaryPointSet * const Point) const; 310 ListOfTesselPointList * GetPathsOfConnectedPoints(const TesselPoint* const Point) const; 311 ListOfTesselPointList * GetClosedPathsOfConnectedPoints(const TesselPoint* const Point) const; 312 TesselPointList * GetCircleOfSetOfPoints(TesselPointSet *SetOfNeighbours, const TesselPoint* const Point, const Vector * const Reference = NULL) const; 313 TesselPointList * GetCircleOfConnectedTriangles(TesselPointSet *SetOfNeighbours, const TesselPoint* const Point, const Vector * const Reference) const; 314 class BoundaryPointSet * GetCommonEndpoint(const BoundaryLineSet * line1, const BoundaryLineSet * line2) const; 315 TriangleList * FindTriangles(const TesselPoint* const Points[3]) const; 316 TriangleList * FindClosestTrianglesToVector(const Vector *x, const LinkedCell* LC) const; 317 BoundaryTriangleSet * FindClosestTriangleToVector(const Vector *x, const LinkedCell* LC) const; 307 318 bool IsInnerPoint(const Vector &Point, const LinkedCell* const LC) const; 308 bool IsInnerPoint(const TesselPoint * const Point, const LinkedCell* const LC) const; 319 double GetDistanceSquaredToTriangle(const Vector &Point, const BoundaryTriangleSet* const triangle) const; 320 double GetDistanceSquaredToSurface(const Vector &Point, const LinkedCell* const LC) const; 309 321 bool AddBoundaryPoint(TesselPoint * Walker, const int n); 322 DistanceToPointMap * FindClosestBoundaryPointsToVector(const Vector *x, const LinkedCell* LC) const; 323 BoundaryLineSet * FindClosestBoundaryLineToVector(const Vector *x, const LinkedCell* LC) const; 310 324 311 325 // print for debugging
Note:
See TracChangeset
for help on using the changeset viewer.