Geom Software - C++ Programming and Geometry Libraries
Fade2.5D Documentation pages v1.63
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

Triangle2pT

int oppIdx

## Friends

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

## ◆ Edge2()

 GEOM_FADE25D::Edge2::Edge2 ( Triangle2 * pT, int oppIdx_ )
Parameters
 pT is 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).

## ◆ getLength25D()

 double GEOM_FADE25D::Edge2::getLength25D ( ) const

Get the 2.5D length

Returns
the 2.5D length of the edge

## ◆ getLength2D()

 double GEOM_FADE25D::Edge2::getLength2D ( ) const

Get the 2D length

Returns
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
Returns
the source point of the edge, i.e. pT->getCorner((oppIdx+1)%3)

## ◆ getTrg()

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

## ◆ getTriangle()

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

Get the triangle

Returns
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

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

## ◆ operator!=()

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

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
inline

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
inline

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: