21 #if GEOM_PSEUDO3D==GEOM_TRUE
22 namespace GEOM_FADE25D {
23 #elif GEOM_PSEUDO3D==GEOM_FALSE
24 namespace GEOM_FADE2D {
26 #error GEOM_PSEUDO3D is not defined
61 if(pT<e.pT)
return true;
62 if(pT>e.pT)
return false;
63 if(oppIdx<e.oppIdx)
return true;
76 return(pT==e.pT && oppIdx==e.oppIdx);
87 return((pT!=e.pT || oppIdx!=e.oppIdx));
106 #if GEOM_PSEUDO3D==GEOM_TRUE
119 #if GEOM_PSEUDO3D==GEOM_TRUE
124 double getLength25D()
const;
151 friend std::ostream &operator<<(std::ostream &stream,
const Edge2& e);
159 struct Func_ltUndirected
161 bool operator()(
const Edge2& eA,
const Edge2& eB)
const
163 Point2 *pA1,*pA2,*pB1,*pB2;
166 if(pA1>pA2) std::swap(pA1,pA2);
167 if(pB1>pB2) std::swap(pB1,pB2);
169 if(pA1<pB1)
return true;
170 if(pA1>pB1)
return false;
175 inline bool sameEdge(
const Edge2& eA,
const Edge2& eB)
177 return ( (eA.getSrc()==eB.getSrc() && eA.getTrg()==eB.getTrg()) ||
178 (eA.getSrc()==eB.getTrg() && eA.getTrg()==eB.getSrc()) );
185 bool operator()(
const Edge2& e0,
const Edge2& e1)
const
195 bool operator()(
const Edge2& e0,
const Edge2& e1)
const
203 #if GEOM_PSEUDO3D==GEOM_TRUE
206 struct Func_ltEdge25D
208 bool operator()(
const Edge2& e0,
const Edge2& e1)
const
210 if(e0.getLength25D()<e1.getLength25D())
return true;
Edge2 is a directed edge.
Definition: Edge2.h:34
bool operator!=(const Edge2 &e) const
operator!=()
Definition: Edge2.h:85
Triangle2 * getTriangle() const
Edge2(Triangle2 *pT, int oppIdx_)
Constructor.
Point2 * getSrc() const
Get the source point.
bool operator<(const Edge2 &e) const
operator<()
Definition: Edge2.h:59
void getPoints(Point2 *&p1, Point2 *&p2) const
Get the endpoints.
Point2 * getTrg() const
Get the target point.
void getTriangles(Triangle2 *&pT0, Triangle2 *&pT1, int &idx0, int &idx1) const
double getLength2D() const
bool operator==(const Edge2 &e) const
operator==()
Definition: Edge2.h:74
Point.
Definition: Point2.h:53
Triangle.
Definition: Triangle2.h:60
Functor to sort edges by 2d length (descending)
Definition: Edge2.h:194
Functor to sort edges by 2d length (ascending)
Definition: Edge2.h:184