OGRE  1.11.6
Object-Oriented Graphics Rendering Engine
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.

Member Enumeration Documentation

◆ VertexReductionMethod

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.

Member Data Documentation

◆ distance

Real Ogre::LodLevel::distance

Distance to swap the Lod.

This depends on LodStrategy.

◆ reductionMethod

VertexReductionMethod Ogre::LodLevel::reductionMethod

Reduction method to use.

See also
ProgressiveMeshGenerator::VertexReductionMethod

◆ reductionValue

Real Ogre::LodLevel::reductionValue

The value, which depends on reductionMethod.

◆ manualMeshName

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.

◆ outUniqueVertexCount

size_t Ogre::LodLevel::outUniqueVertexCount

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

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

◆ outSkipped

bool Ogre::LodLevel::outSkipped

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


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