Ignore:
Timestamp:
Apr 20, 2010, 10:34:43 AM (15 years ago)
Author:
Frederik Heber <heber@…>
Children:
39f41d5
Parents:
342fbc9
git-author:
Frederik Heber <heber@…> (04/20/10 09:26:30)
git-committer:
Frederik Heber <heber@…> (04/20/10 10:34:43)
Message:

Rewrite of tesselation procedure: treatment of degenerated triangles.

The central idea is that when matching open lines are present, then we have to check whether candidate matches desired ThirdPoint and that the calculated OptCenter matches as well. The latter is essential for degenerated triangles, that can only be decerned by their (Other)OptCenter.

Asparagine is now tesselated correctly from radius 1.5 up to 25.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.hpp

    r342fbc9 r086db0  
    163163    bool IsPresentTupel(const BoundaryPointSet * const Points[3]) const;
    164164    bool IsPresentTupel(const BoundaryTriangleSet * const T) const;
    165     bool CheckDegeneracy(Vector *OtherOptCenter, const double RADIUS, const LinkedCell *LC) const;
    166165    void SetTopNode(const BoundaryTriangleSet * const topnode);
    167166
     
    283282    void AddTesselationPoint(TesselPoint* Candidate, const int n);
    284283    void SetTesselationPoint(TesselPoint* Candidate, const int n) const;
    285     void AddTesselationLine(const BoundaryPointSet * const candidate, class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
     284    void AddTesselationLine(const Vector * const OptCenter, const BoundaryPointSet * const candidate, class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
    286285    void AddNewTesselationTriangleLine(class BoundaryPointSet *a, class BoundaryPointSet *b, const int n);
    287286    void AddExistingTesselationTriangleLine(class BoundaryLineSet *FindLine, int n);
    288287    void AddTesselationTriangle();
    289288    void AddTesselationTriangle(const int nr);
    290     void AddCandidateTriangle(TesselPoint *first, TesselPoint *second, TesselPoint *third);
    291     void AddDegeneratedTriangle(BoundaryTriangleSet *&triangle, Vector *OtherOptCenter, const double RADIUS, const LinkedCell *LC);
     289    void AddCandidateTriangle(CandidateForTesselation &CandidateLine);
     290    BoundaryTriangleSet * const AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC);
    292291    void AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell *LC);
    293292    void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle);
    294293    void RemoveTesselationLine(class BoundaryLineSet *line);
    295294    void RemoveTesselationPoint(class BoundaryPointSet *point);
     295    bool CheckDegeneracy(Vector *OtherOptCenter, const double RADIUS, const LinkedCell *LC) const;
    296296
    297297
     
    299299    void FindStartingTriangle(const double RADIUS, const LinkedCell *LC);
    300300    void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC);
    301     void FindThirdPointForTesselation(Vector &NormalVector, Vector &SearchDirection, Vector &OldSphereCenter, CandidateForTesselation &CandidateLine, const class BoundaryPointSet  * const ThirdNode, const double RADIUS, const LinkedCell *LC) const;
    302     bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
     301    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;
     302    bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
    303303    int CheckPresenceOfTriangle(class TesselPoint *Candidates[3]) const;
    304304    class BoundaryTriangleSet * GetPresentTriangle(TesselPoint *Candidates[3]);
Note: See TracChangeset for help on using the changeset viewer.