CrystalSpace

Public API Reference

iLODControl Struct Reference
[Mesh support]

The iLODControl interface represents an object that has controllable Level Of Detail (LOD) features. More...

#include <iengine/lod.h>

Inheritance diagram for iLODControl:

List of all members.

Public Member Functions

virtual void GetLOD (iSharedVariable *&varm, iSharedVariable *&vara) const =0
 Return the parameters of the LOD function as shared variables.
virtual void GetLOD (float &m, float &a) const =0
 Get the current parameters of the LOD function.
virtual void GetLODFade (iSharedVariable *&varf) const =0
 Set the fading factor as a shared variable.
virtual void GetLODFade (float &f) const =0
 Get the fading factor to be used while transitioning from one LOD to another.
virtual int GetLODPolygonCount (float lod) const =0
 Get a rough estimate of the number of polygons for a given LOD value (between 0 and 1, similar to the value used by SetLOD()).
virtual void SetLOD (iSharedVariable *varm, iSharedVariable *vara)=0
 Set the parameters of the LOD function using shared variables.
virtual void SetLOD (float m, float a)=0
 Set the parameters of the function used to compute the LOD of the mesh depending on the distance to the camera.
virtual void SetLODFade (iSharedVariable *varf)=0
 Set the fading factor as a shared variable.
virtual void SetLODFade (float f)=0
 Set the fading factor to be used while transitioning from one LOD to another.

Detailed Description

The iLODControl interface represents an object that has controllable Level Of Detail (LOD) features.

The LOD manager can work with this.

Definition at line 37 of file lod.h.


Member Function Documentation

virtual void iLODControl::GetLOD ( iSharedVariable *&  varm,
iSharedVariable *&  vara 
) const [pure virtual]

Return the parameters of the LOD function as shared variables.

If the parameters were not set using shared variables then varm and vara will be set to 0.

virtual void iLODControl::GetLOD ( float &  m,
float &  a 
) const [pure virtual]

Get the current parameters of the LOD function.

virtual void iLODControl::GetLODFade ( iSharedVariable *&  varf  )  const [pure virtual]

Set the fading factor as a shared variable.

If this factor was not previsouly set using shared variables then varf will be set to 0.

virtual void iLODControl::GetLODFade ( float &  f  )  const [pure virtual]

Get the fading factor to be used while transitioning from one LOD to another.

virtual int iLODControl::GetLODPolygonCount ( float  lod  )  const [pure virtual]

Get a rough estimate of the number of polygons for a given LOD value (between 0 and 1, similar to the value used by SetLOD()).

Note that a mesh object that doesn't support LOD should always return the same number of polygons.

virtual void iLODControl::SetLOD ( iSharedVariable varm,
iSharedVariable vara 
) [pure virtual]

Set the parameters of the LOD function using shared variables.

virtual void iLODControl::SetLOD ( float  m,
float  a 
) [pure virtual]

Set the parameters of the function used to compute the LOD of the mesh depending on the distance to the camera.

The function is as follows:

    float lod = m * distance + a;
 

The result of this function will be capped to the [0,1] range, with 0 meaning worst quality possible (highest speed) and 1 highest quality.

virtual void iLODControl::SetLODFade ( iSharedVariable varf  )  [pure virtual]

Set the fading factor as a shared variable.

virtual void iLODControl::SetLODFade ( float  f  )  [pure virtual]

Set the fading factor to be used while transitioning from one LOD to another.


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

Generated for Crystal Space 2.1 by doxygen 1.6.1