Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselation.hpp

    r7c14ec r7dea7c  
    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"
    3643
    3744// ======================================================= some template functions =========================================
     
    115122
    116123    void GetNormalVector(Vector &NormalVector);
     124    void GetCenter(Vector *center);
    117125    bool GetIntersectionInsideTriangle(ofstream *out, Vector *MolCenter, Vector *x, Vector *Intersection);
    118126    bool ContainsBoundaryLine(class BoundaryLineSet *line);
    119127    bool ContainsBoundaryPoint(class BoundaryPointSet *point);
     128    bool ContainsBoundaryPoint(class TesselPoint *point);
    120129    class BoundaryPointSet *GetThirdEndpoint(class BoundaryLineSet *line);
    121130    bool IsPresentTupel(class BoundaryPointSet *Points[3]);
    122     void GetCenter(Vector *center);
     131    bool IsPresentTupel(class BoundaryTriangleSet *T);
    123132
    124133    class BoundaryPointSet *endpoints[3];
     
    196205    void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, int n);
    197206    void AddTesselationTriangle();
     207    void AddTesselationTriangle(int nr);
    198208    void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle);
    199209    void RemoveTesselationLine(class BoundaryLineSet *line);
    200210    void RemoveTesselationPoint(class BoundaryPointSet *point);
    201211
    202     bool IsInside(Vector *pointer);
    203212    class BoundaryPointSet *GetCommonEndpoint(class BoundaryLineSet * line1, class BoundaryLineSet * line2);
    204213
    205214    // concave envelope
    206215    void FindStartingTriangle(ofstream *out, const 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);
     216    void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, class LinkedCell *LC);
    208217    void FindThirdPointForTesselation(Vector NormalVector, Vector SearchDirection, Vector OldSphereCenter, class BoundaryLineSet *BaseLine, class TesselPoint *ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, class LinkedCell *LC);
    209     bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, int N, LinkedCell *LC);
     218    bool FindNextSuitableTriangle(ofstream *out, BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, LinkedCell *LC);
    210219    int CheckPresenceOfTriangle(ofstream *out, class TesselPoint *Candidates[3]);
     220    class BoundaryTriangleSet * GetPresentTriangle(ofstream *out, TesselPoint *Candidates[3]);
    211221
    212222    // convex envelope
     
    215225    bool InsertStraddlingPoints(ofstream *out, PointCloud *cloud, LinkedCell *LC);
    216226    double RemovePointFromTesselatedSurface(ofstream *out, class BoundaryPointSet *point);
    217     bool FlipBaseline(ofstream *out, class BoundaryLineSet *Base);
    218     bool PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);
     227    class BoundaryLineSet * FlipBaseline(ofstream *out, class BoundaryLineSet *Base);
     228    double PickFarthestofTwoBaselines(ofstream *out, class BoundaryLineSet *Base);
    219229    class BoundaryPointSet *IsConvexRectangle(ofstream *out, class BoundaryLineSet *Base);
    220     map<int, int> FindAllDegeneratedTriangles();
     230    map<int, int> * FindAllDegeneratedTriangles();
     231    map<int, int> * FindAllDegeneratedLines();
    221232    void RemoveDegeneratedTriangles();
    222 
    223     list<TesselPoint*> * GetCircleOfConnectedPoints(ofstream *out, TesselPoint* Point);
    224     list<TesselPoint*> * GetNeighboursOnCircleOfConnectedPoints(ofstream *out, list<TesselPoint*> *connectedPoints, TesselPoint* Point, Vector* Reference);
     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);
    225240    list<BoundaryTriangleSet*> *FindTriangles(TesselPoint* Points[3]);
    226241    list<BoundaryTriangleSet*> * FindClosestTrianglesToPoint(ofstream *out, Vector *x, LinkedCell* LC);
     
    229244    bool IsInnerPoint(ofstream *out, TesselPoint *Point, LinkedCell* LC);
    230245    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);
    231254
    232255    PointMap PointsOnBoundary;
     
    251274    class BoundaryLineSet *BLS[3];
    252275    class BoundaryTriangleSet *BTS;
     276    class BoundaryTriangleSet *LastTriangle;
     277    int TriangleFilesWritten;
    253278
    254279  private:
     
    258283};
    259284
    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);
    266285
    267286#endif /* TESSELATION_HPP_ */
Note: See TracChangeset for help on using the changeset viewer.