Changes in src/tesselation.hpp [244a84:125b3c]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/tesselation.hpp
r244a84 r125b3c 52 52 // ======================================================= some template functions ========================================= 53 53 54 #define IndexToIndex map <int, int>55 56 54 #define PointMap map < int, class BoundaryPointSet * > 57 55 #define PointSet set < class BoundaryPointSet * > … … 79 77 #define PolygonList list < class BoundaryPolygonSet * > 80 78 81 #define DistanceToPointMap multimap <double, class BoundaryPointSet * >82 #define DistanceToPointPair pair <double, class BoundaryPointSet * >83 84 79 #define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> > 85 80 #define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> > … … 87 82 #define TesselPointList list <TesselPoint *> 88 83 #define TesselPointSet set <TesselPoint *> 89 90 #define ListOfTesselPointList list<list <TesselPoint *> *>91 84 92 85 /********************************************** declarations *******************************/ … … 108 101 public: 109 102 BoundaryPointSet(); 110 BoundaryPointSet(TesselPoint * constWalker);103 BoundaryPointSet(TesselPoint * Walker); 111 104 ~BoundaryPointSet(); 112 105 113 void AddLine( BoundaryLineSet * constline);106 void AddLine(class BoundaryLineSet *line); 114 107 115 108 LineMap lines; … … 127 120 public: 128 121 BoundaryLineSet(); 129 BoundaryLineSet(BoundaryPointSet * const Point[2], const int number); 130 BoundaryLineSet(BoundaryPointSet * const Point1, BoundaryPointSet * const Point2, const int number); 122 BoundaryLineSet(class BoundaryPointSet *Point[2], const int number); 131 123 ~BoundaryLineSet(); 132 124 133 void AddTriangle( BoundaryTriangleSet * consttriangle);134 bool IsConnectedTo(c onst BoundaryLineSet * const line) const;135 bool ContainsBoundaryPoint(c onst BoundaryPointSet * const point) const;136 bool CheckConvexityCriterion() const;137 class BoundaryPointSet *GetOtherEndpoint(c onst BoundaryPointSet * const point) const;125 void AddTriangle(class BoundaryTriangleSet *triangle); 126 bool IsConnectedTo(class BoundaryLineSet *line); 127 bool ContainsBoundaryPoint(class BoundaryPointSet *point); 128 bool CheckConvexityCriterion(); 129 class BoundaryPointSet *GetOtherEndpoint(class BoundaryPointSet *); 138 130 139 131 class BoundaryPointSet *endpoints[2]; … … 150 142 public: 151 143 BoundaryTriangleSet(); 152 BoundaryTriangleSet(class BoundaryLineSet * const line[3], constint number);144 BoundaryTriangleSet(class BoundaryLineSet *line[3], int number); 153 145 ~BoundaryTriangleSet(); 154 146 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; 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); 165 156 166 157 class BoundaryPointSet *endpoints[3]; … … 235 226 virtual TesselPoint *GetPoint() const { return NULL; }; 236 227 virtual TesselPoint *GetTerminalPoint() const { return NULL; }; 237 virtual int GetMaxId() const { return 0; };238 228 virtual void GoToNext() const {}; 239 229 virtual void GoToPrevious() const {}; … … 300 290 double PickFarthestofTwoBaselines(class BoundaryLineSet *Base); 301 291 class BoundaryPointSet *IsConvexRectangle(class BoundaryLineSet *Base); 302 IndexToIndex* FindAllDegeneratedTriangles();303 IndexToIndex* FindAllDegeneratedLines();292 map<int, int> * FindAllDegeneratedTriangles(); 293 map<int, int> * FindAllDegeneratedLines(); 304 294 void RemoveDegeneratedTriangles(); 305 295 void AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell *LC); 306 296 int CorrectAllDegeneratedPolygons(); 307 297 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; 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; 318 307 bool IsInnerPoint(const Vector &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; 308 bool IsInnerPoint(const TesselPoint * const Point, const LinkedCell* const LC) const; 321 309 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;324 310 325 311 // print for debugging
Note:
See TracChangeset
for help on using the changeset viewer.