
Public Member Functions | |
| FacetMeshAccumulator () | |
| ~FacetMeshAccumulator () | |
| void | AccumulateFacet (const TFacet3D *aF) |
| void | PrepareAccumulation (uint32 estimatedFacetsCount) |
| MCErr | CalculateNormals (real smoothAngle) |
| void | MakeFacetMesh (FacetMesh **outMesh) |
| uint32 | GetAccumulatedFacetsCount () |
| TMCArray< TFacet3D > & | GetFacetsArray () |
Protected Member Functions | |
| const TMCArray < VertexPlusIndex > & | GetVertices () const |
| const TMCArray < IndexedFacet > & | GetFacets () const |
| TVertex3D * | VertexAt (int32 index) |
| void | BuildUsingHash (const TMCArray< TFacet3D > *facets, const TMCArray< TFacet3D > *facets2=nil) |
| int32 | AddVertex (const TVertex3D &avertex) |
| int32 | HashVertex (const TVertex3D &avertex) |
| void | AddFacet (const TFacet3D &afacet) |
Protected Attributes | |
| TMCArray < VertexPlusIndex > | fVertices |
| TMCArray< IndexedFacet > | fFacets |
| TMCArray< int32 > | fHashTable |
| int32 | fHashTableSize |
| int16 | fHashPower |
| TMCArray< TFacet3D > | fOrigFacets |
Friends | |
| class | IndexedFacetIterator |
Classes | |
| struct | VertexPlusIndex |
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:
FacetMeshAccumulator accumulator; for (all triangles) { accumulator.AccumulateFacet(triangle); } TMCCountedPtr<FacetMesh> facetMesh; accumulator.MakeFacetMesh(&facetMesh);
| FacetMeshAccumulator::FacetMeshAccumulator | ( | ) |
| FacetMeshAccumulator::~FacetMeshAccumulator | ( | ) |
| void FacetMeshAccumulator::AccumulateFacet | ( | const TFacet3D * | aF | ) |
Adds one triangle to the accumulator.
| void FacetMeshAccumulator::PrepareAccumulation | ( | uint32 | estimatedFacetsCount | ) |
Call this before accumulating facets to preallocate memory for them if you know how many triangles will be added.
Computes the normals of the facets and does smoothing if abs(smoothAngle) > 1E-5 Call this after accumulating the facets and before MakeFacetMesh.
| void FacetMeshAccumulator::MakeFacetMesh | ( | FacetMesh ** | outMesh | ) |
Generates the actual facet Mesh.
| uint32 FacetMeshAccumulator::GetAccumulatedFacetsCount | ( | ) | [inline] |
Returns the number of triangles that were accumulated.
| const TMCArray<VertexPlusIndex>& FacetMeshAccumulator::GetVertices | ( | ) | const [inline, protected] |
| const TMCArray<IndexedFacet>& FacetMeshAccumulator::GetFacets | ( | ) | const [inline, protected] |
| void FacetMeshAccumulator::BuildUsingHash | ( | const TMCArray< TFacet3D > * | facets, | |
| const TMCArray< TFacet3D > * | facets2 = nil | |||
| ) | [protected] |
| void FacetMeshAccumulator::AddFacet | ( | const TFacet3D & | afacet | ) | [protected] |
friend class IndexedFacetIterator [friend] |
TMCArray<VertexPlusIndex> FacetMeshAccumulator::fVertices [protected] |
TMCArray<IndexedFacet> FacetMeshAccumulator::fFacets [protected] |
TMCArray<int32> FacetMeshAccumulator::fHashTable [protected] |
int32 FacetMeshAccumulator::fHashTableSize [protected] |
int16 FacetMeshAccumulator::fHashPower [protected] |
TMCArray<TFacet3D> FacetMeshAccumulator::fOrigFacets [protected] |
1.5.3