Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/tesselation.hpp

    r244a84 rce70970  
    4343#define DoTecplotOutput 1
    4444#define DoRaster3DOutput 1
    45 #define DoVRMLOutput 1
     45#define DoVRMLOutput 0
    4646#define TecplotSuffix ".dat"
    4747#define Raster3DSuffix ".r3d"
     
    8989
    9090#define ListOfTesselPointList list<list <TesselPoint *> *>
     91
     92enum centers {Opt, OtherOpt};
    9193
    9294/********************************************** declarations *******************************/
     
    249251  public :
    250252  CandidateForTesselation(BoundaryLineSet* currentBaseLine);
    251   CandidateForTesselation(TesselPoint* candidate, BoundaryLineSet* currentBaseLine, Vector OptCandidateCenter, Vector OtherOptCandidateCenter);
     253  CandidateForTesselation(TesselPoint* candidate, BoundaryLineSet* currentBaseLine, BoundaryPointSet *point, Vector OptCandidateCenter, Vector OtherOptCandidateCenter);
    252254  ~CandidateForTesselation();
    253255
     256  bool CheckValidity(const double RADIUS, const LinkedCell *LC) const;
     257
    254258  TesselPointList pointlist;
    255   BoundaryLineSet *BaseLine;
     259  const BoundaryLineSet * BaseLine;
     260  const BoundaryPointSet * ThirdPoint;
     261  const BoundaryTriangleSet *T;
     262  Vector OldCenter;
    256263  Vector OptCenter;
    257264  Vector OtherOptCenter;
     
    274281    void AddTesselationPoint(TesselPoint* Candidate, const int n);
    275282    void SetTesselationPoint(TesselPoint* Candidate, const int n) const;
    276     void AddTesselationLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
    277     void AlwaysAddTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
     283    void AddTesselationLine(const Vector * const OptCenter, const BoundaryPointSet * const candidate, class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
     284    void AddNewTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
     285    void AddExistingTesselationTriangleLine(class BoundaryLineSet *FindLine, int n);
    278286    void AddTesselationTriangle();
    279287    void AddTesselationTriangle(const int nr);
    280     void AddCandidateTriangle(CandidateForTesselation CandidateLine);
     288    void AddCandidateTriangle(CandidateForTesselation &CandidateLine, enum centers type);
     289    void AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC);
     290    void AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell *LC);
    281291    void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle);
    282292    void RemoveTesselationLine(class BoundaryLineSet *line);
    283293    void RemoveTesselationPoint(class BoundaryPointSet *point);
     294    bool CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC) const;
    284295
    285296
    286297    // concave envelope
    287     void FindStartingTriangle(const double RADIUS, const LinkedCell *LC);
     298    bool FindStartingTriangle(const double RADIUS, const LinkedCell *LC);
    288299    void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC);
    289     void FindThirdPointForTesselation(Vector &NormalVector, Vector &SearchDirection, Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class TesselPoint  * const ThirdNode, const double RADIUS, const LinkedCell *LC) const;
    290     bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
     300    void FindThirdPointForTesselation(const Vector &NormalVector, const Vector &SearchDirection, const Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet  * const ThirdNode, const double RADIUS, const LinkedCell *LC) const;
     301    bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
     302    bool FindCandidatesforOpenLines(const double RADIUS, const LinkedCell *&LCList);
    291303    int CheckPresenceOfTriangle(class TesselPoint *Candidates[3]) const;
    292304    class BoundaryTriangleSet * GetPresentTriangle(TesselPoint *Candidates[3]);
     
    318330    bool IsInnerPoint(const Vector &Point, const LinkedCell* const LC) const;
    319331    double GetDistanceSquaredToTriangle(const Vector &Point, const BoundaryTriangleSet* const triangle) const;
    320     double GetDistanceSquaredToSurface(const Vector &Point, const LinkedCell* const LC) const;
     332    double GetDistanceToSurface(const Vector &Point, const LinkedCell* const LC) const;
     333    BoundaryTriangleSet * GetClosestTriangleOnSurface(const Vector &Point, const LinkedCell* const LC) const;
    321334    bool AddBoundaryPoint(TesselPoint * Walker, const int n);
    322335    DistanceToPointMap * FindClosestBoundaryPointsToVector(const Vector *x, const LinkedCell* LC) const;
     
    362375
    363376    //bool HasOtherBaselineBetterCandidate(const BoundaryLineSet * const BaseRay, const TesselPoint * const OptCandidate, double ShortestAngle, double RADIUS, const LinkedCell * const LC) const;
     377    void FindDegeneratedCandidatesforOpenLines(TesselPoint * const Sprinter, const Vector * const OptCenter);
    364378};
    365379
Note: See TracChangeset for help on using the changeset viewer.