Geom Software - C++ Programming and Geometry Libraries
Fade2.5D Documentation pages v1.60
GEOM_FADE25D::Edge2 Class Reference

Directed Edge.

#include <Edge2.h>

Public Member Functions

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

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

◆ 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 edge.

◆ 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.

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