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 |
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);
|
|
|
|
|
|
|
|
Adds one triangle to the accumulator. |
|
|
|
|
|
|
|
||||||||||||
|
|
|
|
Computes the normals of the facets and does smoothing if abs(smoothAngle) > 1E-5 Call this after accumulating the facets and before MakeFacetMesh. |
|
|
Returns the number of triangles that were accumulated. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Generates the actual facet Mesh. |
|
|
Call this before accumulating facets to preallocate memory for them if you know how many triangles will be added. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.3.9.1