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


Oriented, indexed triangle. More...

Public Member Functions

 Face ()
 
bool containsDirectedEdge (int e) const
 Contains the forward edge e if e >= 0 and the backward edge ~e otherwise. More...
 
bool containsEdge (int e) const
 
bool containsVertex (int v) const
 

Public Attributes

int edgeIndex [3]
 
Edge indices in counter-clockwise order. More...
 
int vertexIndex [3]
 
Vertices in the face in counter-clockwise order. More...
 

Static Public Attributes

static const int NONE
 
Used by Edge::faceIndex to indicate a missing face. More...
 

Detailed Description


Oriented, indexed triangle.

Constructor & Destructor Documentation

◆ Face()

G3D::MeshAlg::Face::Face ( )

Member Function Documentation

◆ containsDirectedEdge()

bool G3D::MeshAlg::Face::containsDirectedEdge ( int  e) const
inline

Contains the forward edge e if e >= 0 and the backward edge ~e otherwise.

◆ containsEdge()

bool G3D::MeshAlg::Face::containsEdge ( int  e) const
inline

◆ containsVertex()

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

Member Data Documentation

◆ edgeIndex

int G3D::MeshAlg::Face::edgeIndex[3]


Edge indices in counter-clockwise order.

Edges are undirected, so it is important to know which way each edge is pointing in a face. This is encoded using negative indices.

If edgeIndex[i] >= 0 then this face contains the directed edge between vertex indices
edgeArray[face.edgeIndex[i]].vertexIndex[0] and edgeArray[face.edgeIndex[i]].vertexIndex[1].

If edgeIndex[i] < 0 then ~edgeIndex[i] (i.e. the two's complement of) is used and this face contains the directed edge between vertex indices edgeArray[~face.edgeIndex[i]].vertexIndex[0] and edgeArray[~face.edgeIndex[i]].vertexIndex[1].

Degenerate faces may include the same edge multiple times.

Referenced by containsDirectedEdge(), and containsEdge().

◆ NONE

const int G3D::MeshAlg::Face::NONE
static


Used by Edge::faceIndex to indicate a missing face.

This is a large negative value.

Referenced by G3D::MeshAlg::Edge::boundary().

◆ vertexIndex

int G3D::MeshAlg::Face::vertexIndex[3]


Vertices in the face in counter-clockwise order.

Degenerate faces may include the same vertex multiple times.

Referenced by containsVertex().


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