| Support Forum G3D Web Page |
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... | |
Oriented, indexed triangle.
| G3D::MeshAlg::Face::Face | ( | ) |
|
inline |
Contains the forward edge e if e >= 0 and the backward edge ~e otherwise.
|
inline |
|
inline |
| 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().
|
static |
Used by Edge::faceIndex to indicate a missing face.
This is a large negative value.
Referenced by G3D::MeshAlg::Edge::boundary().
| 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().
1.8.15