Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselation.hpp

    r244a84 r125b3c  
    5252// ======================================================= some template functions =========================================
    5353
    54 #define IndexToIndex map <int, int>
    55 
    5654#define PointMap map < int, class BoundaryPointSet * >
    5755#define PointSet set < class BoundaryPointSet * >
     
    7977#define PolygonList list < class BoundaryPolygonSet * >
    8078
    81 #define DistanceToPointMap multimap <double, class BoundaryPointSet * >
    82 #define DistanceToPointPair pair <double, class BoundaryPointSet * >
    83 
    8479#define DistanceMultiMap multimap <double, pair < PointMap::iterator, PointMap::iterator> >
    8580#define DistanceMultiMapPair pair <double, pair < PointMap::iterator, PointMap::iterator> >
     
    8782#define TesselPointList list <TesselPoint *>
    8883#define TesselPointSet set <TesselPoint *>
    89 
    90 #define ListOfTesselPointList list<list <TesselPoint *> *>
    9184
    9285/********************************************** declarations *******************************/
     
    108101  public:
    109102    BoundaryPointSet();
    110     BoundaryPointSet(TesselPoint * const Walker);
     103    BoundaryPointSet(TesselPoint * Walker);
    111104    ~BoundaryPointSet();
    112105
    113     void AddLine(BoundaryLineSet * const line);
     106    void AddLine(class BoundaryLineSet *line);
    114107
    115108    LineMap lines;
     
    127120  public:
    128121    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);
    131123    ~BoundaryLineSet();
    132124
    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;
     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 *);
    138130
    139131    class BoundaryPointSet *endpoints[2];
     
    150142  public:
    151143    BoundaryTriangleSet();
    152     BoundaryTriangleSet(class BoundaryLineSet * const line[3], const int number);
     144    BoundaryTriangleSet(class BoundaryLineSet *line[3], int number);
    153145    ~BoundaryTriangleSet();
    154146
    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);
    165156
    166157    class BoundaryPointSet *endpoints[3];
     
    235226  virtual TesselPoint *GetPoint() const { return NULL; };
    236227  virtual TesselPoint *GetTerminalPoint() const { return NULL; };
    237   virtual int GetMaxId() const { return 0; };
    238228  virtual void GoToNext() const {};
    239229  virtual void GoToPrevious() const {};
     
    300290    double PickFarthestofTwoBaselines(class BoundaryLineSet *Base);
    301291    class BoundaryPointSet *IsConvexRectangle(class BoundaryLineSet *Base);
    302     IndexToIndex * FindAllDegeneratedTriangles();
    303     IndexToIndex * FindAllDegeneratedLines();
     292    map<int, int> * FindAllDegeneratedTriangles();
     293    map<int, int> * FindAllDegeneratedLines();
    304294    void RemoveDegeneratedTriangles();
    305295    void AddBoundaryPointByDegeneratedTriangle(class TesselPoint *point, LinkedCell *LC);
    306296    int CorrectAllDegeneratedPolygons();
    307297
    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;
    318307    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;
    321309    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;
    324310
    325311    // print for debugging
Note: See TracChangeset for help on using the changeset viewer.