Oriented, indexed triangle.
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.