#include <OgreProgressiveMesh.h>
Public Types | |
typedef std::vector< IndexData * > | LODFaceList |
enum | VertexReductionQuota { VRQ_CONSTANT, VRQ_PROPORTIONAL } |
The way to derive the quota of vertices which are reduced at each LOD. More... | |
Public Member Functions | |
ProgressiveMesh (const VertexData *vertexData, const IndexData *indexData) | |
Constructor, takes the geometry data and index buffer. | |
virtual | ~ProgressiveMesh () |
virtual void | addExtraVertexPositionBuffer (const VertexData *vertexData) |
Adds an extra vertex position buffer. | |
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. | |
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 Member Functions | |
void | addWorkingData (const VertexData *vertexData, const IndexData *indexData) |
Internal method for building PMWorkingData from geometry data. | |
void | initialiseEdgeCollapseCosts (void) |
Internal method for initialising the edge collapse costs. | |
Real | computeEdgeCollapseCost (PMVertex *src, PMVertex *dest) |
Internal calculation method for deriving a collapse cost from u to v. | |
Real | computeEdgeCostAtVertexForBuffer (WorkingDataList::iterator idata, size_t vertIndex) |
Internal method evaluates all collapse costs from this vertex and picks the lowest for a single buffer. | |
void | computeEdgeCostAtVertex (size_t vertIndex) |
Internal method evaluates all collapse costs from this vertex for every buffer and returns the worst. | |
void | computeAllCosts (void) |
Internal method to compute edge collapse costs for all buffers /. | |
size_t | getNextCollapser (void) |
Internal method for getting the index of next best vertex to collapse. | |
void | bakeNewLOD (IndexData *pData) |
Internal method builds an new LOD based on the current state. | |
void | collapse (PMVertex *collapser) |
Internal method, collapses vertex onto it's saved collapse target. | |
void | dumpContents (const String &log) |
Internal debugging method. | |
Protected Attributes | |
const VertexData * | mpVertexData |
const IndexData * | mpIndexData |
size_t | mCurrNumIndexes |
size_t | mNumCommonVertices |
WorkingDataList | mWorkingData |
Multiple copies, 1 per vertex buffer. | |
WorstCostList | mWorstCosts |
The worst collapse cost from all vertex buffers for each vertex. |
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.
Definition at line 55 of file OgreProgressiveMesh.h.
|
Definition at line 183 of file OgreProgressiveMesh.h. |
|
Definition at line 182 of file OgreProgressiveMesh.h. |
|
Definition at line 68 of file OgreProgressiveMesh.h. |
|
Definition at line 181 of file OgreProgressiveMesh.h. |
|
Definition at line 194 of file OgreProgressiveMesh.h. |
|
Definition at line 184 of file OgreProgressiveMesh.h. |
|
The way to derive the quota of vertices which are reduced at each LOD.
Definition at line 60 of file OgreProgressiveMesh.h. |
|
Constructor, takes the geometry data and index buffer.
|
|
|
|
Adds an extra vertex position buffer.
|
|
Internal method for building PMWorkingData from geometry data.
|
|
Internal method builds an new LOD based on the current state.
|
|
Builds the progressive mesh with the specified number of levels.
|
|
Internal method, collapses vertex onto it's saved collapse target.
|
|
Internal method to compute edge collapse costs for all buffers /.
|
|
Internal calculation method for deriving a collapse cost from u to v.
|
|
Internal method evaluates all collapse costs from this vertex for every buffer and returns the worst.
|
|
Internal method evaluates all collapse costs from this vertex and picks the lowest for a single buffer.
|
|
Internal debugging method.
|
|
Internal method for getting the index of next best vertex to collapse.
|
|
Internal method for initialising the edge collapse costs.
|
|
Definition at line 112 of file OgreProgressiveMesh.h. |
|
Definition at line 113 of file OgreProgressiveMesh.h. |
|
Definition at line 110 of file OgreProgressiveMesh.h. |
|
Definition at line 109 of file OgreProgressiveMesh.h. |
|
Multiple copies, 1 per vertex buffer.
Definition at line 196 of file OgreProgressiveMesh.h. |
|
The worst collapse cost from all vertex buffers for each vertex.
Definition at line 199 of file OgreProgressiveMesh.h. |
Copyright © 2000-2005 by The OGRE Team
This work is licensed under a Creative Commons Attribution-ShareAlike 2.5 License.
Last modified Sun Mar 12 14:41:50 2006