# FacetMesh Struct Reference
[Data Structures]

Inheritance diagram for FacetMesh:

List of all members.

## Public Member Functions
void | Clone (FacetMesh **clone)
void | Append (const FacetMesh &mesh)
boolean | IsFacetMeshValid () const
boolean | IsEdgeListInvalid () const
void | MarkEdgeListInvalid ()
boolean | IsPolygonEqnListInvalid () const
void | MarkPolygonEqnListInvalid ()
void | CalcPolygonEqnList ()
| calculate the list of plane equations
uint32 | VerticesNbr () const
uint32 | FacetsNbr () const
void | SetVerticesCount (const uint32 numVertices)
void | SetFacetsCount (const uint32 numFacets)
void | CalcBBox (TBBox3D &bBox)
| computes the bounding box of the mesh
void | BuildEdgeList ()
void | ReorderFacetsByUVSpaceID (uint32 uvSpaceCount, TMCArray< int32 > *newTriangleIndex=NULL)
void | DumpDataToFile (char *fileName) const
TFacetMeshRenderFlags | GetRenderFlags ()
void | SetRenderFlags (TFacetMeshRenderFlags renderFlags)
## Static Public Member Functions
static void | Create (FacetMesh **outMesh)
## Public Attributes
TMCArray< Triangle > | fFacets
| facets containing 3 indexes to the points in fVertices
TMCArray< uint32 > | fUVSpaceID
| UVspace ID at each facet.
TMCClassArray< TJointIndex > | fFacetPrimaryJointIndex
| Primary joint index of skinned primitive for each facet.
TMCArray< uint32 > | fFacetPrimitiveID
| An index for each facet cooresponding to the index of a sub primitive of the object (ie. polygon of a vertex object).
uint32 | fPrimitiveIDCount
| The count of primitive ids (ie. should be the max id that is found in fFacetPrimitiveID).
TMCArray< TVector3 > | fVertices
| positions of points
TMCArray< TVector3 > | fNormals
| normals at the vertices
TMCArray< TVector2 > | fuv
| uv space coordinates at each vertices
TMCArray< TVector3 > | fTextureUVW
| solid texture coordinates to clamp procedurals/projections (unsupported)
TMCArray< TMCColorRGBA8 > | fVertexColors
| when you want to explicitly choose the vertex color
TMCArray< TMCColorRGBA8 > | fPolygonColors
TMCArray< TMCColorRGBA8 > | fPolygonBackColors
TMCArray< TVector4 > | fPolygonEqns
TEdgeList | fEdgeList
TFacetMeshRenderFlags | fRenderFlags
TMCClassArray < TShadingDomainCache > | fShadingDomains
TMCCountedPtrArray< TFacetCache > | fRenderCaches
## Protected Member Functions
| FacetMesh ()
| ~FacetMesh ()

## Detailed Description

structure representing a facet mesh, a representation for triangular polygon data using corresponding arrays of data. Note the several more routines in PublicUtilities.h for managing facet meshes. Be careful about maintaining the polygon equation and edge lists.

## Constructor & Destructor Documentation

FacetMesh::FacetMesh | ( |  | ) | `[inline, protected]`

FacetMesh::~FacetMesh | ( |  | ) | `[inline, protected]`

## Member Function Documentation

void FacetMesh::Append | ( | const FacetMesh & | mesh | ) |

void FacetMesh::BuildEdgeList | ( |  | ) |

builds the list of edges for the mesh if the list is already up to date, nothing is done.

void FacetMesh::CalcBBox | ( | TBBox3D & | bBox | ) | `[inline]`

computes the bounding box of the mesh

void FacetMesh::CalcPolygonEqnList | ( |  | ) | `[inline]`

calculate the list of plane equations

static void FacetMesh::Create | ( | FacetMesh ** | outMesh | ) | `[inline, static]`

void FacetMesh::DumpDataToFile | ( | char * | fileName | ) | const

uint32 FacetMesh::FacetsNbr | ( |  | ) | const`[inline]`

TFacetMeshRenderFlags FacetMesh::GetRenderFlags | ( |  | ) | `[inline]`

boolean FacetMesh::IsEdgeListInvalid | ( |  | ) | const`[inline]`

you must call this routine any time the facets change, the edge generators rely on this to generate the edge lists

boolean FacetMesh::IsFacetMeshValid | ( |  | ) | const

boolean FacetMesh::IsPolygonEqnListInvalid | ( |  | ) | const`[inline]`

you must call this routine any time the facets change, the plane generators rely on this to generate the polygon equations

void FacetMesh::MarkEdgeListInvalid | ( |  | ) | `[inline]`

void FacetMesh::MarkPolygonEqnListInvalid | ( |  | ) | `[inline]`

void FacetMesh::ReorderFacetsByUVSpaceID | ( | uint32 | uvSpaceCount,
|  | TMCArray< int32 > * | newTriangleIndex = `NULL` |
| ) |  |  |

void FacetMesh::SetFacetsCount | ( | const uint32 | numFacets | ) | `[inline]`

void FacetMesh::SetRenderFlags | ( | TFacetMeshRenderFlags | renderFlags | ) | `[inline]`

void FacetMesh::SetVerticesCount | ( | const uint32 | numVertices | ) | `[inline]`

uint32 FacetMesh::VerticesNbr | ( |  | ) | const`[inline]`

## Member Data Documentation

TEdgeList FacetMesh::fEdgeList

TMCClassArray<TJointIndex> FacetMesh::fFacetPrimaryJointIndex

Primary joint index of skinned primitive for each facet.

TMCArray<uint32> FacetMesh::fFacetPrimitiveID

An index for each facet cooresponding to the index of a sub primitive of the object (ie. polygon of a vertex object).

TMCArray<Triangle> FacetMesh::fFacets

facets containing 3 indexes to the points in fVertices

TMCArray<TVector3> FacetMesh::fNormals

normals at the vertices

TMCArray<TMCColorRGBA8> FacetMesh::fPolygonBackColors

TMCArray<TMCColorRGBA8> FacetMesh::fPolygonColors

TMCArray<TVector4> FacetMesh::fPolygonEqns

these are the plane equations for the polygons (a combo of unit normal and plane coeff) we use the plane eqn of the form for compute the plane coeff A x + B y + C z + D = 0

uint32 FacetMesh::fPrimitiveIDCount

The count of primitive ids (ie. should be the max id that is found in fFacetPrimitiveID).

TMCCountedPtrArray<TFacetCache> FacetMesh::fRenderCaches

TFacetMeshRenderFlags FacetMesh::fRenderFlags

TMCClassArray<TShadingDomainCache> FacetMesh::fShadingDomains

TMCArray<TVector3> FacetMesh::fTextureUVW

solid texture coordinates to clamp procedurals/projections (unsupported)

TMCArray<TVector2> FacetMesh::fuv

uv space coordinates at each vertices

TMCArray<uint32> FacetMesh::fUVSpaceID

UVspace ID at each facet.

TMCArray<TMCColorRGBA8> FacetMesh::fVertexColors

when you want to explicitly choose the vertex color

TMCArray<TVector3> FacetMesh::fVertices

positions of points

The documentation for this struct was generated from the following file:

- I3dShFacetMesh.h