Public Types |
typedef std::vector< LODFaceData > | LODFaceList |
enum | VertexReductionQuota { VRQ_CONSTANT,
VRQ_PROPORTIONAL
} |
| The way to derive the quota of vertices which are reduced at each LOD. More...
|
Public Methods |
| ProgressiveMesh (GeometryData *data, ushort *indexBuffer, ushort numIndexes) |
| Constructor, takes the geometry data and index buffer. More...
|
virtual | ~ProgressiveMesh () |
virtual void | addExtraVertexPositionBuffer (Real *buffer) |
| Adds an extra vertex position buffer. More...
|
virtual void | build (ushort numLevels, LODFaceList *outList, VertexReductionQuota quota=VRQ_PROPORTIONAL, Real reductionValue=0.5f) |
| Builds the progressive mesh with the specified number of levels. More...
|
Protected Types |
typedef std::vector< PMTriangle > | TriangleList |
typedef std::vector< PMFaceVertex > | FaceVertexList |
typedef std::vector< PMVertex > | CommonVertexList |
typedef std::vector< Real > | WorstCostList |
typedef std::vector< PMWorkingData > | WorkingDataList |
Protected Methods |
void | addWorkingData (Real *pPositions, GeometryData *data, ushort *indexBuffer, ushort numIndexes) |
| Internal method for building PMWorkingData from geometry data. More...
|
void | initialiseEdgeCollapseCosts (void) |
| Internal method for initialising the edge collapse costs. More...
|
Real | computeEdgeCollapseCost (PMVertex *src, PMVertex *dest) |
| Internal calculation method for deriving a collapse cost from u to v. More...
|
Real | computeEdgeCostAtVertexForBuffer (WorkingDataList::iterator idata, ushort vertIndex) |
| Internal method evaluates all collapse costs from this vertex and picks the lowest for a single buffer. More...
|
void | computeEdgeCostAtVertex (ushort vertIndex) |
| Internal method evaluates all collapse costs from this vertex for every buffer and returns the worst. More...
|
void | computeAllCosts (void) |
| Internal method to compute edge collapse costs for all buffers /. More...
|
ushort | getNextCollapser (void) |
| Internal method for getting the index of next best vertex to collapse. More...
|
void | bakeNewLOD (LODFaceData *pData) |
| Internal method builds an new LOD based on the current state. More...
|
void | collapse (PMVertex *collapser) |
| Internal method, collapses vertex onto it's saved collapse target. More...
|
void | dumpContents (const String &log) |
| Internal debugging method. More...
|
Protected Attributes |
GeometryData * | mpGeomData |
ushort * | mpIndexBuffer |
ushort | mNumIndexes |
ushort | mCurrNumIndexes |
ushort | mNumCommonVertices |
WorkingDataList | mWorkingData |
| Multiple copies, 1 per vertex buffer. More...
|
WorstCostList | mWorstCosts |
| The worst collapse cost from all vertex buffers for each vertex. More...
|
This class is dedicated to reducing the number of triangles in a given mesh taking into account seams in both geometry and texture co-ordinates and meshes which have multiple frames.
NB the interface of this class will certainly change when compiled vertex buffers are supported.