Ogre::ProgressiveMeshGenerator Class Reference

Improved version of ProgressiveMesh. More...

`#include <OgreProgressiveMeshGenerator.h>`

Inheritance diagram for Ogre::ProgressiveMeshGenerator:
[legend]

## Classes

union | IndexBufferPointer
struct | PMCollapsedEdge
struct | PMEdge
struct | PMIndexBufferInfo
struct | PMTriangle
struct | PMVertex
struct | PMVertexEqual
struct | PMVertexHash
struct | VectorSet

## Public Member Functions

| ProgressiveMeshGenerator ()
virtual | ~ProgressiveMeshGenerator ()
virtual void | generateAutoconfiguredLodLevels (MeshPtr &mesh)
| Generates the LOD levels for a mesh without configuring it. More...
void | generateLodLevels (LodConfig &lodConfig)
| Generates the LOD levels for a mesh. More...
virtual void | getAutoconfig (MeshPtr &inMesh, LodConfig &outLodConfig)
| Fills LOD Config with a config, which works on any mesh. More...

## Protected Types

typedef multimap< Real, PMVertex * >::type | CollapseCostHeap
typedef vector< PMCollapsedEdge >::type | CollapsedEdges
typedef vector< PMIndexBufferInfo >::type | IndexBufferInfoList
typedef vector< PMTriangle >::type | TriangleList
typedef HashSet< PMVertex *, PMVertexHash, PMVertexEqual > | UniqueVertexSet
typedef VectorSet< PMEdge, 8 > | VEdges
typedef vector< PMVertex >::type | VertexList
typedef vector< PMVertex * >::type | VertexLookupList
typedef VectorSet< PMTriangle *, 7 > | VTriangles

## Protected Member Functions

void | addEdge (PMVertex *v, const PMEdge &edge)
void | addIndexData (IndexData *indexData, bool useSharedVertexLookup, unsigned short submeshID)
template<typename IndexType >
void | addIndexDataImpl (IndexType *iPos, const IndexType *iEnd, VertexLookupList &lookup, unsigned short submeshID)
void | addTriangleToEdges (PMTriangle *triangle)
void | addVertexData (VertexData *vertexData, bool useSharedVertexLookup)
void | assertOutdatedCollapseCost (PMVertex *vertex)
void | assertValidMesh ()
void | assertValidVertex (PMVertex *v)
virtual void | bakeLods ()
size_t | calcLodVertexCount (const LodLevel &lodConfig)
void | cleanupMemory ()
void | collapse (PMVertex *vertex)
void | computeCosts ()
Real | computeEdgeCollapseCost (PMVertex *src, PMEdge *dstEdge)
void | computeLods (LodConfig &lodConfigs)
void | computeVertexCollapseCost (PMVertex *vertex)
size_t | findDstID (unsigned int srcID, unsigned short submeshID)
PMTriangle * | findSideTriangle (const PMVertex *v1, const PMVertex *v2)
PMEdge * | getPointer (VEdges::iterator it)
int | getTriangleID (PMTriangle *triangle)
bool | hasSrcID (unsigned int srcID, unsigned short submeshID)
void | initialize ()
bool | isBorderVertex (const PMVertex *vertex) const
bool | isDuplicateTriangle (PMTriangle *triangle, PMTriangle *triangle2)
PMTriangle * | isDuplicateTriangle (PMTriangle *triangle)
void | printTriangle (PMTriangle *triangle, stringstream &str)
void | removeEdge (PMVertex *v, const PMEdge &edge)
void | removeTriangleFromEdges (PMTriangle *triangle, PMVertex *skip=NULL)
void | replaceVertexID (PMTriangle *triangle, unsigned int oldID, unsigned int newID, PMVertex *dst)
void | tuneContainerSize ()
void | updateVertexCollapseCost (PMVertex *src)

## Protected Attributes

CollapseCostHeap | mCollapseCostHeap
Real | mCollapseCostLimit
IndexBufferInfoList | mIndexBufferInfoList
MeshPtr | mMesh
Real | mMeshBoundingSphereRadius
String | mMeshName
| The name of the mesh being processed. More...
VertexLookupList | mSharedVertexLookup
TriangleList | mTriangleList
UniqueVertexSet | mUniqueVertexSet
VertexList | mVertexList
VertexLookupList | mVertexLookup
CollapsedEdges | tmpCollapsedEdges

## Detailed Description

Improved version of ProgressiveMesh.

Definition at line 72 of file OgreProgressiveMeshGenerator.h.

## Member Typedef Documentation

## CollapseCostHeap

typedef multimap<Real, PMVertex*>::type Ogre::ProgressiveMeshGenerator::CollapseCostHeap

protected

Definition at line 117 of file OgreProgressiveMeshGenerator.h.

## CollapsedEdges

typedef vector<PMCollapsedEdge>::type Ogre::ProgressiveMeshGenerator::CollapsedEdges

protected

Definition at line 123 of file OgreProgressiveMeshGenerator.h.

## IndexBufferInfoList

typedef vector<PMIndexBufferInfo>::type Ogre::ProgressiveMeshGenerator::IndexBufferInfoList

protected

Definition at line 124 of file OgreProgressiveMeshGenerator.h.

## TriangleList

typedef vector<PMTriangle>::type Ogre::ProgressiveMeshGenerator::TriangleList

protected

Definition at line 115 of file OgreProgressiveMeshGenerator.h.

## UniqueVertexSet

typedef HashSet<PMVertex*, PMVertexHash, PMVertexEqual> Ogre::ProgressiveMeshGenerator::UniqueVertexSet

protected

Definition at line 116 of file OgreProgressiveMeshGenerator.h.

## VEdges

typedef VectorSet<PMEdge, 8> Ogre::ProgressiveMeshGenerator::VEdges

protected

Definition at line 120 of file OgreProgressiveMeshGenerator.h.

## VertexList

typedef vector<PMVertex>::type Ogre::ProgressiveMeshGenerator::VertexList

protected

Definition at line 112 of file OgreProgressiveMeshGenerator.h.

## VertexLookupList

typedef vector<PMVertex*>::type Ogre::ProgressiveMeshGenerator::VertexLookupList

protected

Definition at line 118 of file OgreProgressiveMeshGenerator.h.

## VTriangles

typedef VectorSet<PMTriangle*, 7> Ogre::ProgressiveMeshGenerator::VTriangles

protected

Definition at line 121 of file OgreProgressiveMeshGenerator.h.

## Constructor & Destructor Documentation

## ProgressiveMeshGenerator()

Ogre::ProgressiveMeshGenerator::ProgressiveMeshGenerator | ( |  | ) |

## ~ProgressiveMeshGenerator()

virtual Ogre::ProgressiveMeshGenerator::~ProgressiveMeshGenerator | ( |  | ) |

virtual

## Member Function Documentation

## addEdge()

void Ogre::ProgressiveMeshGenerator::addEdge | ( | PMVertex * | v,
|  | const PMEdge & | edge
| ) |  |

protected

## addIndexData()

void Ogre::ProgressiveMeshGenerator::addIndexData | ( | IndexData * | indexData,
|  | bool | useSharedVertexLookup,
|  | unsigned short | submeshID
| ) |  |

protected

## addIndexDataImpl()

template<typename IndexType >

void Ogre::ProgressiveMeshGenerator::addIndexDataImpl | ( | IndexType * | iPos,
|  | const IndexType * | iEnd,
|  | VertexLookupList & | lookup,
|  | unsigned short | submeshID
| ) |  |

protected

## addTriangleToEdges()

void Ogre::ProgressiveMeshGenerator::addTriangleToEdges | ( | PMTriangle * | triangle | ) |

protected

## addVertexData()

void Ogre::ProgressiveMeshGenerator::addVertexData | ( | VertexData * | vertexData,
|  | bool | useSharedVertexLookup
| ) |  |

protected

## assertOutdatedCollapseCost()

void Ogre::ProgressiveMeshGenerator::assertOutdatedCollapseCost | ( | PMVertex * | vertex | ) |

protected

## assertValidMesh()

void Ogre::ProgressiveMeshGenerator::assertValidMesh | ( |  | ) |

protected

## assertValidVertex()

void Ogre::ProgressiveMeshGenerator::assertValidVertex | ( | PMVertex * | v | ) |

protected

## bakeLods()

virtual void Ogre::ProgressiveMeshGenerator::bakeLods | ( |  | ) |

protected virtual

Reimplemented in Ogre::PMWorker.

## calcLodVertexCount()

size_t Ogre::ProgressiveMeshGenerator::calcLodVertexCount | ( | const LodLevel & | lodConfig | ) |

protected

## cleanupMemory()

void Ogre::ProgressiveMeshGenerator::cleanupMemory | ( |  | ) |

protected

## collapse()

void Ogre::ProgressiveMeshGenerator::collapse | ( | PMVertex * | vertex | ) |

protected

## computeCosts()

void Ogre::ProgressiveMeshGenerator::computeCosts | ( |  | ) |

protected

## computeEdgeCollapseCost()

Real Ogre::ProgressiveMeshGenerator::computeEdgeCollapseCost | ( | PMVertex * | src,
|  | PMEdge * | dstEdge
| ) |  |

protected

## computeLods()

void Ogre::ProgressiveMeshGenerator::computeLods | ( | LodConfig & | lodConfigs | ) |

protected

## computeVertexCollapseCost()

void Ogre::ProgressiveMeshGenerator::computeVertexCollapseCost | ( | PMVertex * | vertex | ) |

protected

## findDstID()

size_t Ogre::ProgressiveMeshGenerator::findDstID | ( | unsigned int | srcID,
|  | unsigned short | submeshID
| ) |  |

protected

## findSideTriangle()

PMTriangle* Ogre::ProgressiveMeshGenerator::findSideTriangle | ( | const PMVertex * | v1,
|  | const PMVertex * | v2
| ) |  |

protected

## generateAutoconfiguredLodLevels()

virtual void Ogre::ProgressiveMeshGeneratorBase::generateAutoconfiguredLodLevels | ( | MeshPtr & | mesh | ) |

virtual inherited

Generates the LOD levels for a mesh without configuring it.

Parameters

  mesh | Generate the LOD for this mesh.

## generateLodLevels()

void Ogre::ProgressiveMeshGenerator::generateLodLevels | ( | LodConfig & | lodConfig | ) |

virtual

Generates the LOD levels for a mesh.

Parameters

  lodConfig | Specification of the requested LOD levels.

Implements Ogre::ProgressiveMeshGeneratorBase.

## getAutoconfig()

virtual void Ogre::ProgressiveMeshGeneratorBase::getAutoconfig | ( | MeshPtr & | inMesh,
|  | LodConfig & | outLodConfig
| ) |  |

virtual inherited

Fills LOD Config with a config, which works on any mesh.

Parameters

  inMesh | Optimize for this mesh.
  outLodConfig | LOD configuration storing the output.

## getPointer()

PMEdge* Ogre::ProgressiveMeshGenerator::getPointer | ( | VEdges::iterator | it | ) |

protected

## getTriangleID()

int Ogre::ProgressiveMeshGenerator::getTriangleID | ( | PMTriangle * | triangle | ) |

protected

## hasSrcID()

bool Ogre::ProgressiveMeshGenerator::hasSrcID | ( | unsigned int | srcID,
|  | unsigned short | submeshID
| ) |  |

protected

## initialize()

void Ogre::ProgressiveMeshGenerator::initialize | ( |  | ) |

protected

## isBorderVertex()

bool Ogre::ProgressiveMeshGenerator::isBorderVertex | ( | const PMVertex * | vertex | ) | const

protected

## isDuplicateTriangle() [1/2]

bool Ogre::ProgressiveMeshGenerator::isDuplicateTriangle | ( | PMTriangle * | triangle,
|  | PMTriangle * | triangle2
| ) |  |

protected

## isDuplicateTriangle() [2/2]

PMTriangle* Ogre::ProgressiveMeshGenerator::isDuplicateTriangle | ( | PMTriangle * | triangle | ) |

protected

## printTriangle()

void Ogre::ProgressiveMeshGenerator::printTriangle | ( | PMTriangle * | triangle,
|  | stringstream & | str
| ) |  |

protected

## removeEdge()

void Ogre::ProgressiveMeshGenerator::removeEdge | ( | PMVertex * | v,
|  | const PMEdge & | edge
| ) |  |

protected

## removeTriangleFromEdges()

void Ogre::ProgressiveMeshGenerator::removeTriangleFromEdges | ( | PMTriangle * | triangle,
|  | PMVertex * | skip = `NULL`
| ) |  |

protected

## replaceVertexID()

void Ogre::ProgressiveMeshGenerator::replaceVertexID | ( | PMTriangle * | triangle,
|  | unsigned int | oldID,
|  | unsigned int | newID,
|  | PMVertex * | dst
| ) |  |

protected

## tuneContainerSize()

void Ogre::ProgressiveMeshGenerator::tuneContainerSize | ( |  | ) |

protected

## updateVertexCollapseCost()

void Ogre::ProgressiveMeshGenerator::updateVertexCollapseCost | ( | PMVertex * | src | ) |

protected

## Member Data Documentation

## mCollapseCostHeap

CollapseCostHeap Ogre::ProgressiveMeshGenerator::mCollapseCostHeap

protected

Definition at line 197 of file OgreProgressiveMeshGenerator.h.

## mCollapseCostLimit

Real Ogre::ProgressiveMeshGenerator::mCollapseCostLimit

protected

Definition at line 212 of file OgreProgressiveMeshGenerator.h.

## mIndexBufferInfoList

IndexBufferInfoList Ogre::ProgressiveMeshGenerator::mIndexBufferInfoList

protected

Definition at line 199 of file OgreProgressiveMeshGenerator.h.

## mMesh

MeshPtr Ogre::ProgressiveMeshGenerator::mMesh

protected

Definition at line 201 of file OgreProgressiveMeshGenerator.h.

## mMeshBoundingSphereRadius

Real Ogre::ProgressiveMeshGenerator::mMeshBoundingSphereRadius

protected

Definition at line 211 of file OgreProgressiveMeshGenerator.h.

## mMeshName

String Ogre::ProgressiveMeshGenerator::mMeshName

protected

The name of the mesh being processed.

This is separate from mMesh in order to allow for access from background threads.

Definition at line 209 of file OgreProgressiveMeshGenerator.h.

## mSharedVertexLookup

VertexLookupList Ogre::ProgressiveMeshGenerator::mSharedVertexLookup

protected

Definition at line 192 of file OgreProgressiveMeshGenerator.h.

## mTriangleList

TriangleList Ogre::ProgressiveMeshGenerator::mTriangleList

protected

Definition at line 195 of file OgreProgressiveMeshGenerator.h.

## mUniqueVertexSet

UniqueVertexSet Ogre::ProgressiveMeshGenerator::mUniqueVertexSet

protected

Definition at line 196 of file OgreProgressiveMeshGenerator.h.

## mVertexList

VertexList Ogre::ProgressiveMeshGenerator::mVertexList

protected

Definition at line 194 of file OgreProgressiveMeshGenerator.h.

## mVertexLookup

VertexLookupList Ogre::ProgressiveMeshGenerator::mVertexLookup

protected

Definition at line 193 of file OgreProgressiveMeshGenerator.h.

## tmpCollapsedEdges

CollapsedEdges Ogre::ProgressiveMeshGenerator::tmpCollapsedEdges

protected

Definition at line 198 of file OgreProgressiveMeshGenerator.h.

The documentation for this class was generated from the following file:

- OgreProgressiveMeshGenerator.h

Copyright © 2012 Torus Knot Software Ltd
This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.