Go to the documentation of this file.
28 #ifndef __Distance_Lod_Strategy_H__
29 #define __Distance_Lod_Strategy_H__
Level of detail strategy based on distance from camera to an object's bounding sphere.
vector< MeshLodUsage >::type MeshLodUsageList
bool mReferenceViewEnabled
vector< Real >::type LodValueList
A viewpoint from which the scene will be rendered.
static DistanceLodSphereStrategy & getSingleton(void)
Override standard Singleton retrieval.
DistanceLodStrategy(const String &name)
Default constructor.
Abstract class defining a movable object in a scene.
virtual Real getValueImpl(const MovableObject *movableObject, const Camera *camera) const
Compute the LOD value for a given movable object relative to a given camera.
static DistanceLodBoxStrategy & getSingleton(void)
Override standard Singleton retrieval.
virtual Real transformUserValue(Real userValue) const
Transform user supplied value to internal value.
virtual ushort getIndex(Real value, const Material::LodValueList &materialLodValueList) const
Get the index of the LOD usage which applies to a given value.
DistanceLodBoxStrategy()
Default constructor.
Strategy for determining level of detail.
Real getSquaredDepth(const MovableObject *movableObject, const Ogre::Camera *camera) const
Get the squared depth from camera to the LOD object.
vector< Real >::type LodValueList
distance list used to specify LOD
Level of detail strategy based on distance from camera to an object's bounding box.
virtual bool isSorted(const Mesh::LodValueList &values) const
Determine if the LOD values are sorted from greatest detail to least detail.
Template class for creating single-instance global classes.
void setReferenceViewEnabled(bool value)
Enables to disables use of the reference view.
Wrapper class which indicates a given angle value is in Radians.
virtual void sort(Mesh::MeshLodUsageList &meshLodUsageList) const
Sort mesh LOD usage list from greatest to least detail.
Level of detail strategy based on distance from camera.
static DistanceLodBoxStrategy * getSingletonPtr(void)
Override standard Singleton retrieval.
DistanceLodSphereStrategy()
Default constructor.
virtual Real getBaseValue() const
Get the value of the first (highest) level of detail.
static DistanceLodSphereStrategy * getSingletonPtr(void)
Override standard Singleton retrieval.
Real getSquaredDepth(const MovableObject *movableObject, const Ogre::Camera *camera) const
Get the squared depth from camera to the LOD object.
void setReferenceView(Real viewportWidth, Real viewportHeight, Radian fovY)
Sets the reference view upon which the distances were based.
virtual Real transformBias(Real factor) const
Transform LOD bias so it only needs to be multiplied by the LOD value.
virtual Real getSquaredDepth(const MovableObject *movableObject, const Ogre::Camera *camera) const =0
Get the squared depth from camera to the LOD object.
float Real
Software floating point type.
virtual ushort getIndex(Real value, const Mesh::MeshLodUsageList &meshLodUsageList) const
Get the index of the LOD usage which applies to a given value.
bool isReferenceViewEnabled() const
Determine if use of the reference view is enabled.
Copyright © 2012 Torus Knot Software Ltd

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