Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselation.hpp

    r7dea7c r7c14ec  
    3434class PointCloud;
    3535class Tesselation;
    36 
    37 #define DoTecplotOutput 1
    38 #define DoRaster3DOutput 1
    39 #define DoVRMLOutput 1
    40 #define TecplotSuffix ".dat"
    41 #define Raster3DSuffix ".r3d"
    42 #define VRMLSUffix ".wrl"
    4336
    4437// ======================================================= some template functions =========================================
     
    122115
    123116    void GetNormalVector(Vector &NormalVector);
    124     void GetCenter(Vector *center);
    125117    bool GetIntersectionInsideTriangle(ofstream *out, Vector *MolCenter, Vector *x, Vector *Intersection);
    126118    bool ContainsBoundaryLine(class BoundaryLineSet *line);
    127119    bool ContainsBoundaryPoint(class BoundaryPointSet *point);
    128     bool ContainsBoundaryPoint(class TesselPoint *point);
    129120    class BoundaryPointSet *GetThirdEndpoint(class BoundaryLineSet *line);
    130121    bool IsPresentTupel(class BoundaryPointSet *Points[3]);
    131     bool IsPresentTupel(class BoundaryTriangleSet *T);
     122    void GetCenter(Vector *center);
    132123
    133124    class BoundaryPointSet *endpoints[3];
     
    205196    void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);
    206197    void AddTesselationTriangle();
    207     void AddTesselationTriangle(int nr);
    208198    void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle);
    209199    void RemoveTesselationLine(class BoundaryLineSet *line);
    210200    void RemoveTesselationPoint(class BoundaryPointSet *point);
    211201
     202    bool IsInside(Vector *pointer);
    212203    class BoundaryPointSet *GetCommonEndpoint(class BoundaryLineSet * line1, class BoundaryLineSet * line2);
    213204
    214205    // concave envelope
    215206    void FindStartingTriangle(ofstream *out, const double RADIUS, class LinkedCell *LC);
    216     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);
    217208    void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, class LinkedCell *LC);
    218     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);
    219210    int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]);
    220     class BoundaryTriangleSet * GetPresentTriangle(ofstream *out, TesselPoint *Candidates[3]);
    221211
    222212    // convex envelope
     
    225215    bool InsertStraddlingPoints(ofstream *out, PointCloud *cloud, LinkedCell *LC);
    226216    double RemovePointFromTesselatedSurface(ofstream *out, class BoundaryPointSet *point);
    227     class BoundaryLineSet * FlipBaseline(ofstream *out, class BoundaryLineSet *Base);
    228     double PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);
     217    bool FlipBaseline(ofstream *out, class BoundaryLineSet *Base);
     218    bool PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);
    229219    class BoundaryPointSet *IsConvexRectangle(ofstream *out, class BoundaryLineSet *Base);
    230     map<int, int> * FindAllDegeneratedTriangles();
    231     map<int, int> * FindAllDegeneratedLines();
     220    map<int, int> FindAllDegeneratedTriangles();
    232221    void RemoveDegeneratedTriangles();
    233     void AddBoundaryPointByDegeneratedTriangle(ofstream *out, class TesselPoint *point, LinkedCell *LC);
    234 
    235     set<TesselPoint*> * GetAllConnectedPoints(ofstream *out, TesselPoint* Point);
    236     set<BoundaryTriangleSet*> *GetAllTriangles(ofstream *out, class BoundaryPointSet *Point);
    237     list<list<TesselPoint*> *> * GetPathsOfConnectedPoints(ofstream *out, TesselPoint* Point);
    238     list<list<TesselPoint*> *> * GetClosedPathsOfConnectedPoints(ofstream *out, TesselPoint* Point);
    239     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);
    240225    list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]);
    241226    list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC);
     
    244229    bool IsInnerPoint(ofstream *out, TesselPoint *Point, LinkedCell* LC);
    245230    bool AddBoundaryPoint(TesselPoint *Walker, int n);
    246 
    247     // print for debugging
    248     void PrintAllBoundaryPoints(ofstream *out);
    249     void PrintAllBoundaryLines(ofstream *out);
    250     void PrintAllBoundaryTriangles(ofstream *out);
    251 
    252     // store envelope in file
    253     void Output(ofstream *out, const char *filename, PointCloud *cloud);
    254231
    255232    PointMap PointsOnBoundary;
     
    274251    class BoundaryLineSet *BLS[3];
    275252    class BoundaryTriangleSet *BTS;
    276     class BoundaryTriangleSet *LastTriangle;
    277     int TriangleFilesWritten;
    278253
    279254  private:
     
    283258};
    284259
     260bool CheckLineCriteriaForDegeneratedTriangle(class BoundaryPointSet *nodes[3]);
     261bool SortCandidates(class CandidateForTesselation* candidate1, class CandidateForTesselation* candidate2);
     262TesselPoint* FindClosestPoint(const Vector* Point, TesselPoint *&SecondPoint, LinkedCell* LC);
     263TesselPoint* FindSecondClosestPoint(const Vector*, LinkedCell*);
     264double GetAngle(const Vector &point, const Vector &reference, const Vector OrthogonalVector);
     265Vector * GetClosestPointBetweenLine(ofstream *out, class BoundaryLineSet *Base, class BoundaryLineSet *OtherBase);
    285266
    286267#endif /* TESSELATION_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.