Support Forum       G3D Web Page     
Public Member Functions | Public Attributes | List of all members
G3D::MeshAlg::Edge Class Reference

Oriented, indexed edge. More...

Public Member Functions

 Edge ()
 
bool boundary () const
 
Returns true if either faceIndex is NONE. More...
 
bool containsVertex (int v) const
 
bool inFace (int f) const
 Returns true if f is contained in the faceIndex array in either slot. More...
 
int nextEdgeIndexInFace (const Array< Edge > &edgeArray, const Array< Face > &faceArray) const
 Returns the index into the edgeArray of the next Edge along the winding direction of the Face containing this. More...
 
bool operator!= (const Edge &other) const
 
bool operator== (const Edge &other) const
 
Edge reverse () const
 
Returns the reversed edge. More...
 
int twinIndex (const Array< Edge > &edgeArray, const Array< Face > &faceArray) const
 Returns the index in edgeArray of the reverse directed Edge in the adjacent Face. More...
 

Public Attributes

int faceIndex [2]
 
The edge is directed forward in face 0 backward in face 1. More...
 
int vertexIndex [2]
 Degenerate edges may include the same vertex times. More...
 

Detailed Description

Oriented, indexed edge.

Constructor & Destructor Documentation

◆ Edge()

G3D::MeshAlg::Edge::Edge ( )

Member Function Documentation

◆ boundary()

bool G3D::MeshAlg::Edge::boundary ( ) const
inline


Returns true if either faceIndex is NONE.

◆ containsVertex()

bool G3D::MeshAlg::Edge::containsVertex ( int  v) const
inline

◆ inFace()

bool G3D::MeshAlg::Edge::inFace ( int  f) const
inline

Returns true if f is contained in the faceIndex array in either slot.

To see if it is forward in that face, just check edge.faceIndex[0] == f.

◆ nextEdgeIndexInFace()

int G3D::MeshAlg::Edge::nextEdgeIndexInFace ( const Array< Edge > &  edgeArray,
const Array< Face > &  faceArray 
) const

Returns the index into the edgeArray of the next Edge along the winding direction of the Face containing this.

Returns -1 if the data structure is inconsistent and this edge is not found in its containing face.

◆ operator!=()

bool G3D::MeshAlg::Edge::operator!= ( const Edge other) const
inline

◆ operator==()

bool G3D::MeshAlg::Edge::operator== ( const Edge other) const
inline

◆ reverse()

Edge G3D::MeshAlg::Edge::reverse ( ) const
inline


Returns the reversed edge.

◆ twinIndex()

int G3D::MeshAlg::Edge::twinIndex ( const Array< Edge > &  edgeArray,
const Array< Face > &  faceArray 
) const

Returns the index in edgeArray of the reverse directed Edge in the adjacent Face.

At a mesh boundary, returns -1. For a nonmanifold or degenerate mesh Face, returns one of the multiple twins.

Member Data Documentation

◆ faceIndex

int G3D::MeshAlg::Edge::faceIndex[2]


The edge is directed forward in face 0 backward in face 1.

Face index of MeshAlg::Face::NONE indicates a boundary (a.k.a. crack, broken) edge.

Referenced by boundary(), inFace(), operator==(), and reverse().

◆ vertexIndex

int G3D::MeshAlg::Edge::vertexIndex[2]

Degenerate edges may include the same vertex times.

Referenced by containsVertex(), operator==(), and reverse().


documentation generated on Wed Nov 24 2021 08:01:58 using doxygen 1.8.15