Ignore:
Timestamp:
Nov 25, 2009, 12:18:18 PM (16 years ago)
Author:
Frederik Heber <heber@…>
Children:
edf611
Parents:
1a3354
Message:

Now the best (in terms of ShortestAngle) baseline is picked among all open ones instead of the next.

  • Element initialization was done for all constructors in tesselation.cpp
File:
1 edited

Legend:

Unmodified
Added
Removed
  • molecuilder/src/tesselation.hpp

    r1a3354 r4af89b  
    5353#define PointTestPair pair < PointMap::iterator, bool >
    5454#define CandidateList list <class CandidateForTesselation *>
     55#define CandidateMap map <class BoundaryLineSet *, class CandidateForTesselation *>
    5556
    5657#define LineMap multimap < int, class BoundaryLineSet * >
     
    114115    TriangleMap triangles;
    115116    int Nr;
     117    bool skipped;
    116118};
    117119
     
    186188class CandidateForTesselation {
    187189  public :
     190  CandidateForTesselation(BoundaryLineSet* currentBaseLine);
    188191  CandidateForTesselation(TesselPoint* candidate, BoundaryLineSet* currentBaseLine, Vector OptCandidateCenter, Vector OtherOptCandidateCenter);
    189192  ~CandidateForTesselation();
     
    193196  Vector OptCenter;
    194197  Vector OtherOptCenter;
    195 };
     198  double ShortestAngle;
     199  double OtherShortestAngle;
     200};
     201
     202ostream & operator <<(ostream &ost, const  CandidateForTesselation &a);
    196203
    197204// =========================================================== class TESSELATION ===========================================
     
    211218    void AddTesselationTriangle();
    212219    void AddTesselationTriangle(const int nr);
     220    void AddCandidateTriangle(CandidateForTesselation &CandidateLine);
    213221    void RemoveTesselationTriangle(class BoundaryTriangleSet *triangle);
    214222    void RemoveTesselationLine(class BoundaryLineSet *line);
     
    220228    void FindSecondPointForTesselation(class TesselPoint* a, Vector Oben, class TesselPoint*& OptCandidate, double Storage[3], double RADIUS, const LinkedCell *LC);
    221229    void FindThirdPointForTesselation(Vector &NormalVector, Vector &SearchDirection, Vector &OldSphereCenter, class BoundaryLineSet *BaseLine, const class TesselPoint * const ThirdNode, CandidateList* &candidates, double *ShortestAngle, const double RADIUS, const LinkedCell *LC) const;
    222     bool FindNextSuitableTriangle(BoundaryLineSet &Line, BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
     230    bool FindNextSuitableTriangle(CandidateForTesselation &CandidateLine, BoundaryTriangleSet &T, const double& RADIUS, const LinkedCell *LC);
    223231    int CheckPresenceOfTriangle(class TesselPoint *Candidates[3]) const;
    224232    class BoundaryTriangleSet * GetPresentTriangle(TesselPoint *Candidates[3]);
     
    260268    PointMap PointsOnBoundary;
    261269    LineMap LinesOnBoundary;
     270    CandidateMap OpenLines;
    262271    TriangleMap TrianglesOnBoundary;
    263272    int PointsOnBoundaryCount;
Note: See TracChangeset for help on using the changeset viewer.