Ignore:
Timestamp:
Apr 21, 2010, 12:07:01 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
1f2e46
Parents:
7d1633
git-author:
Frederik Heber <heber@…> (04/21/10 11:51:53)
git-committer:
Frederik Heber <heber@…> (04/21/10 12:07:01)
Message:

Rewrite of tesselation: treatment of degenerated triangles and polygons

several tricks have been necessary to make it work for heptane:

  • AddDegeneratedTriangle() is not used, instead AddCandidateTriangle() gets told which OptCenter to use, i.e. which triangle side to add
  • afterwards, in the case of a polygon (multiple candidates for a baseline) we have to set the candidate of internal edges in the polygon to the next point, such that AddTesselationLine() picks the right one
  • The we fill other open lines, needed in case of a degenerated triangle
  • If CheckDegeneracy() - which removes all candidates from the ListOfPoints, not just the first - results in true
  • Then we call AddCandidateTriangle() for the other side of it
  • and again in the case of a polygon, set the candidate for the internal edge accordingly.

Signed-off-by: Frederik Heber <heber@…>

File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.hpp

    r7d1633 rc43766  
    8989
    9090#define ListOfTesselPointList list<list <TesselPoint *> *>
     91
     92enum centers {Opt, OtherOpt};
    9193
    9294/********************************************** declarations *******************************/
     
    284286    void AddTesselationTriangle();
    285287    void AddTesselationTriangle(const int nr);
    286     void AddCandidateTriangle(CandidateForTesselation &CandidateLine);
     288    void AddCandidateTriangle(CandidateForTesselation &CandidateLine, enum centers type);
    287289    void AddDegeneratedTriangle(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC);
    288290    void AddCandidatePolygon(CandidateForTesselation CandidateLine, const double RADIUS, const LinkedCell *LC);
     
    290292    void RemoveTesselationLine(class BoundaryLineSet *line);
    291293    void RemoveTesselationPoint(class BoundaryPointSet *point);
    292     bool CheckDegeneracy(Vector *OtherOptCenter, const double RADIUS, const LinkedCell *LC) const;
     294    bool CheckDegeneracy(CandidateForTesselation &CandidateLine, const double RADIUS, const LinkedCell *LC) const;
    293295
    294296
     
    298300    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;
    299301    bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, const BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
     302    bool FindCandidatesforOpenLines(const double RADIUS, const LinkedCell *&LCList);
    300303    int CheckPresenceOfTriangle(class TesselPoint *Candidates[3]) const;
    301304    class BoundaryTriangleSet * GetPresentTriangle(TesselPoint *Candidates[3]);
     
    372375
    373376    //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);
    374378};
    375379
Note: See TracChangeset for help on using the changeset viewer.