Fade2.5D Documentation pages v2.13
Delaunay Features
GEOM_FADE25D::Edge2 Class Reference

Edge2 is a directed edge.

#include <Edge2.h>

Public Member Functions

 Edge2 (const Edge2 &e_)
 Edge2 (Triangle2 *pT, int oppIdx_)
 Constructor. More...
int getIndex () const
double getLength25D () const
double getLength2D () const
void getPoints (Point2 *&p1, Point2 *&p2) const
 Get the endpoints. More...
Point2getSrc () const
 Get the source point. More...
Point2getTrg () const
 Get the target point. More...
Triangle2getTriangle () const
void getTriangles (Triangle2 *&pT0, Triangle2 *&pT1, int &idx0, int &idx1) const
bool operator!= (const Edge2 &e) const
 operator!=() More...
bool operator< (const Edge2 &e) const
 operator<() More...
Edge2operator= (const Edge2 &other)
bool operator== (const Edge2 &e) const
 operator==() More...

Protected Attributes

int oppIdx


std::ostream & operator<< (std::ostream &stream, const Edge2 &e)

Constructor & Destructor Documentation

◆ Edge2()

GEOM_FADE25D::Edge2::Edge2 ( Triangle2 pT,
int  oppIdx_ 
pTis the triangle from which the edge is constructed
oppIdx_is intra-triangle-index of the opposite vertex (of the edge) in pT

The orientation of the constructed Edge2 is counterclockwise (CCW) with respect to pT. Example: Edge2(pT,0) creates an edge from pT->getCorner(1) to pT->getCorner(2).

Member Function Documentation

◆ getIndex()

int GEOM_FADE25D::Edge2::getIndex ( ) const

Get the opposite index

the intra-triangle-index of the opposite vertex

◆ getLength25D()

double GEOM_FADE25D::Edge2::getLength25D ( ) const

Get the 2.5D length

the 2.5D length of the edge

◆ getLength2D()

double GEOM_FADE25D::Edge2::getLength2D ( ) const

Get the 2D length

the 2D length of the edge, the z-coordinate is ignored

◆ getPoints()

void GEOM_FADE25D::Edge2::getPoints ( Point2 *&  p1,
Point2 *&  p2 
) const

returns the source point of the edge as p1 and the target point as p2

◆ getSrc()

Point2* GEOM_FADE25D::Edge2::getSrc ( ) const
the source point of the edge, i.e. pT->getCorner((oppIdx+1)%3)

◆ getTrg()

Point2* GEOM_FADE25D::Edge2::getTrg ( ) const
the target point of the edge, i.e. pT->getCorner((oppIdx+2)%3)

◆ getTriangle()

Triangle2* GEOM_FADE25D::Edge2::getTriangle ( ) const

Get the triangle

the triangle whose directed edge the present edge is

◆ getTriangles()

void GEOM_FADE25D::Edge2::getTriangles ( Triangle2 *&  pT0,
Triangle2 *&  pT1,
int &  idx0,
int &  idx1 
) const

Get the triangles

the two adjacent triangles of the present edge along with their intra-triangle-indices
pT0is used to return the triangle whose directed edge the present edge is
idx0is the opposite intra-triangle-index in pT0 of the present edge
pT1is the other adjacent triangle at the present edge (or NULL)
idx1is the intra-triangle index of the present edge in pT1 (or -1)

◆ operator!=()

bool GEOM_FADE25D::Edge2::operator!= ( const Edge2 e) const

operator!=() returns true if the compared edges are different. Be aware that edges are directed and therefore two adjacent triangles do not share the same Edge2.

◆ operator<()

bool GEOM_FADE25D::Edge2::operator< ( const Edge2 e) const

operator<() does NOT compare edge lengths but the associated triangle pointers and intra-triangle indices. This is useful when edges are used in STL containers.

◆ operator==()

bool GEOM_FADE25D::Edge2::operator== ( const Edge2 e) const

operator==() compares oriented edges, i.e., it returns only true when the two edges have been made from the same triangle and the same intra-triangle-index i.e., an edge with two adjacent triangles has two Edge2 objects, one in each direction.

The documentation for this class was generated from the following file: