Go to the documentation of this file.
28 #ifndef __Lod_Strategy_H__
29 #define __Lod_Strategy_H__
vector< MeshLodUsage >::type MeshLodUsageList
static void sortAscending(Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of sort suitable for ascending values.
vector< Real >::type LodValueList
Superclass for all objects that wish to use custom memory allocators when their new / delete operator...
virtual bool isSorted(const Mesh::LodValueList &values) const =0
Determine if the LOD values are sorted from greatest detail to least detail.
A viewpoint from which the scene will be rendered.
virtual Real getValueImpl(const MovableObject *movableObject, const Camera *camera) const =0
Compute the LOD value for a given movable object relative to a given camera.
void assertSorted(const Mesh::LodValueList &values) const
Assert that the LOD values are sorted from greatest detail to least detail.
static bool isSortedAscending(const Mesh::LodValueList &values)
Implementation of isSorted suitable for ascending values.
static void sortDescending(Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of sort suitable for descending values.
virtual ushort getIndex(Real value, const Material::LodValueList &materialLodValueList) const =0
Get the index of the LOD usage which applies to a given value.
Abstract class defining a movable object in a scene.
static ushort getIndexDescending(Real value, const Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of getIndex suitable for descending values.
virtual void sort(Mesh::MeshLodUsageList &meshLodUsageList) const =0
Sort mesh LOD usage list from greatest to least detail.
String mName
Name of this strategy.
const String & getName() const
Get the name of this strategy.
Strategy for determining level of detail.
vector< Real >::type LodValueList
distance list used to specify LOD
virtual Real transformBias(Real factor) const =0
Transform LOD bias so it only needs to be multiplied by the LOD value.
virtual ~LodStrategy()
Virtual destructor.
LodStrategy(const String &name)
Constructor accepting name.
virtual Real getBaseValue() const =0
Get the value of the first (highest) level of detail.
virtual ushort getIndex(Real value, const Mesh::MeshLodUsageList &meshLodUsageList) const =0
Get the index of the LOD usage which applies to a given value.
virtual Real transformUserValue(Real userValue) const
Transform user supplied value to internal value.
static ushort getIndexAscending(Real value, const Material::LodValueList &materialLodValueList)
Implementation of getIndex suitable for ascending values.
static bool isSortedDescending(const Mesh::LodValueList &values)
Implementation of isSorted suitable for descending values.
static ushort getIndexDescending(Real value, const Material::LodValueList &materialLodValueList)
Implementation of getIndex suitable for descending values.
float Real
Software floating point type.
static ushort getIndexAscending(Real value, const Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of getIndex suitable for ascending values.
Real getValue(const MovableObject *movableObject, const Camera *camera) const
Compute the LOD value for a given movable object relative to a given camera.
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.