28#ifndef __Lod_Strategy_H__
29#define __Lod_Strategy_H__
A viewpoint from which the scene will be rendered.
static ushort getIndexAscending(Real value, const Material::LodValueList &materialLodValueList)
Implementation of getIndex suitable for ascending values.
static void sortDescending(Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of sort suitable for descending values.
virtual Real getBaseValue() const =0
Get the value of the first (highest) level of detail.
static bool isSortedDescending(const Mesh::LodValueList &values)
Implementation of isSorted suitable for descending values.
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 getValueImpl(const MovableObject *movableObject, const Camera *camera) const =0
Compute the LOD value for a given movable object relative to a given camera.
LodStrategy(const String &name)
Constructor accepting name.
virtual void sort(Mesh::MeshLodUsageList &meshLodUsageList) const =0
Sort mesh LOD usage list from greatest to least detail.
virtual Real transformUserValue(Real userValue) const
Transform user supplied value to internal value.
virtual ~LodStrategy()
Virtual destructor.
static ushort getIndexDescending(Real value, const Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of getIndex suitable for descending values.
String mName
Name of this strategy.
static ushort getIndexDescending(Real value, const Material::LodValueList &materialLodValueList)
Implementation of getIndex suitable for descending values.
virtual bool isSorted(const Mesh::LodValueList &values) const =0
Determine if the LOD values are sorted from greatest detail to least detail.
void assertSorted(const Mesh::LodValueList &values) const
Assert that the LOD values are sorted from greatest detail to least detail.
virtual ushort getIndex(Real value, const Material::LodValueList &materialLodValueList) const =0
Get the index of the LOD usage which applies to a given value.
static void sortAscending(Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of sort 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.
static bool isSortedAscending(const Mesh::LodValueList &values)
Implementation of isSorted suitable for ascending values.
virtual Real transformBias(Real factor) const =0
Transform LOD bias so it only needs to be multiplied by the LOD value.
static ushort getIndexAscending(Real value, const Mesh::MeshLodUsageList &meshLodUsageList)
Implementation of getIndex suitable for ascending values.
const String & getName() const
Get the name of this strategy.
vector< Real >::type LodValueList
distance list used to specify LOD
vector< Real >::type LodValueList
vector< MeshLodUsage >::type MeshLodUsageList
Abstract class defining a movable object in a scene.
SceneCtlAllocatedObject LodAlloc
float Real
Software floating point type.