OGRE  2.0
Object-Oriented Graphics Rendering Engine
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Ogre::LodLevel Struct Reference

Structure for automatic Lod configuration. More...

#include <OgreLodConfig.h>

Public Types

enum  VertexReductionMethod { VRM_PROPORTIONAL, VRM_CONSTANT, VRM_COLLAPSE_COST }
 Type of the reduction. More...
 

Public Attributes

Real distance
 Distance to swap the Lod. More...
 
String manualMeshName
 Set's a mesh as the Lod Level for given distance. More...
 
bool outSkipped
 Whether the Lod level generation was skipped, because it has same vertex count as the previous Lod level. More...
 
size_t outUniqueVertexCount
 This is set by ProgressiveMeshGenerator::build() function. More...
 
VertexReductionMethod reductionMethod
 Reduction method to use. More...
 
Real reductionValue
 The value, which depends on reductionMethod. More...
 

Detailed Description

Structure for automatic Lod configuration.

Definition at line 49 of file OgreLodConfig.h.

Member Enumeration Documentation

Type of the reduction.

Note: The vertex count is determined by unique vertices per submesh. A mesh may have duplicate vertices with same position.

Enumerator
VRM_PROPORTIONAL 

Percentage of vertexes to be removed from each submesh.

Valid range is a number between 0.0 and 1.0

VRM_CONSTANT 

Exact vertex count to be removed from each submesh.

Pass only integers or it will be rounded.

VRM_COLLAPSE_COST 

Reduces the vertices, until the cost is bigger then the given value.

Collapse cost is equal to the amount of artifact the reduction causes. This generates the best Lod output, but the collapse cost depends on implementation.

Definition at line 56 of file OgreLodConfig.h.

Member Data Documentation

Real Ogre::LodLevel::distance

Distance to swap the Lod.

This depends on LodStrategy.

Definition at line 85 of file OgreLodConfig.h.

String Ogre::LodLevel::manualMeshName

Set's a mesh as the Lod Level for given distance.

This allows to generate the Lod levels in third party editors. The mesh should have the same submeshes, same bones and animations, like the original mesh. If you use this parameter, the reduction value and method will be ignored. Using manual mesh is less efficient, because it needs separated vertex buffers.

Definition at line 107 of file OgreLodConfig.h.

bool Ogre::LodLevel::outSkipped

Whether the Lod level generation was skipped, because it has same vertex count as the previous Lod level.

Definition at line 119 of file OgreLodConfig.h.

size_t Ogre::LodLevel::outUniqueVertexCount

This is set by ProgressiveMeshGenerator::build() function.

Use Mesh::getNumLodLevels() for generated Lod count.

Definition at line 114 of file OgreLodConfig.h.

VertexReductionMethod Ogre::LodLevel::reductionMethod

Reduction method to use.

See also
ProgressiveMeshGenerator::VertexReductionMethod

Definition at line 92 of file OgreLodConfig.h.

Real Ogre::LodLevel::reductionValue

The value, which depends on reductionMethod.

Definition at line 97 of file OgreLodConfig.h.


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