FacetMeshAccumulator Class Reference
[Data Structures]
List of all members.
Detailed Description
A Facet Mesh Accumulator turns a set of disconnected triangles (triangle soup) into an indexed facetMesh. It merge vertices that are located at the same position that have the same normals and texture coordinates.
Note that if you already have connection information it might be more efficient to build the FacetMesh directly without going through the accumulator.
The typical way to use the accumulator is:
Constructor & Destructor Documentation
FacetMeshAccumulator::FacetMeshAccumulator |
( |
|
) |
|
FacetMeshAccumulator::~FacetMeshAccumulator |
( |
|
) |
|
Member Function Documentation
void FacetMeshAccumulator::AccumulateFacet |
( |
const TFacet3D * |
aF |
) |
|
Adds one triangle to the accumulator.
void FacetMeshAccumulator::AddFacet |
( |
const TFacet3D & |
afacet |
) |
[protected] |
int32 FacetMeshAccumulator::AddVertex |
( |
const TVertex3D & |
avertex |
) |
[protected] |
MCErr FacetMeshAccumulator::CalculateNormals |
( |
real |
smoothAngle |
) |
|
Computes the normals of the facets and does smoothing if abs(smoothAngle) > 1E-5 Call this after accumulating the facets and before MakeFacetMesh.
uint32 FacetMeshAccumulator::GetAccumulatedFacetsCount |
( |
|
) |
[inline] |
Returns the number of triangles that were accumulated.
int32 FacetMeshAccumulator::GetFinalFacetCount |
( |
|
) |
const |
int32 FacetMeshAccumulator::GetFinalVertexCount |
( |
|
) |
const |
int32 FacetMeshAccumulator::HashVertex |
( |
const TVertex3D & |
avertex |
) |
[protected] |
void FacetMeshAccumulator::MakeFacetMesh |
( |
FacetMesh ** |
outMesh |
) |
|
Generates the actual facet Mesh.
void FacetMeshAccumulator::PrepareAccumulation |
( |
uint32 |
estimatedFacetsCount |
) |
|
Call this before accumulating facets to preallocate memory for them if you know how many triangles will be added.
void FacetMeshAccumulator::Reset |
( |
|
) |
|
void FacetMeshAccumulator::SetDynamicBuild |
( |
uint32 |
estimatedFacetsCount |
) |
|
Set the build mode to dynamic (mesh build during facet accumulation)
TVertex3D* FacetMeshAccumulator::VertexAt |
( |
int32 |
index |
) |
[inline, protected] |
Friends And Related Function Documentation
friend class IndexedFacetIterator [friend] |
Member Data Documentation
The documentation for this class was generated from the following file: