Contents User Forum Source Index APIs by Task APIs by Level Data


G3D::MeshAlg::Face Class Reference

Oriented, indexed triangle. More...

#include <MeshAlg.h>

List of all members.

Public Member Functions

bool containsDirectedEdge (int e) const
bool containsEdge (int e) const
bool containsVertex (int v) const
 Face ()

Public Attributes

int edgeIndex [3]
int vertexIndex [3]

Static Public Attributes

static const int NONE


Detailed Description

Oriented, indexed triangle.


Constructor & Destructor Documentation

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


Member Function Documentation

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

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

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

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


Member Data Documentation

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.

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

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

This is a large negative value.

Vertices in the face in counter-clockwise order.

Degenerate faces may include the same vertex multiple times.


The documentation for this class was generated from the following file:
Generated on Thu Aug 2 11:40:47 2007 for G3D by doxygen 1.5.2
Hosted by SourceForge.net Logo