CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

csStaticLODFactoryMesh Class Reference

This class is used to represent the static lod levels of a hierarchical mesh factory. More...

#include <meshlod.h>

Inheritance diagram for csStaticLODFactoryMesh:

iLODControl iBase List of all members.

Public Methods

 csStaticLODFactoryMesh ()
 constructor. More...

virtual void SetLOD (float m, float a)
 Set a parameters for a function to compute LOD for the given LOD control. More...

virtual void GetLOD (float &m, float &a) const
 Get the current LOD function. More...

virtual void SetLOD (iSharedVariable *varm, iSharedVariable *vara)
 Set LOD using variables. More...

virtual void GetLOD (iSharedVariable *&varm, iSharedVariable *&vara) const
 Return the variables used by lod. More...

virtual int GetLODPolygonCount (float lod) const
 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()). More...

csArray< iMeshFactoryWrapper * > & GetMeshesForLOD (int lod)
 Get the mesh array for the numerical lod. More...

int GetLODCount ()
 Get number of lod levels we have. More...


Detailed Description

This class is used to represent the static lod levels of a hierarchical mesh factory.

It is used as a template to create a csStaticLODMesh instance.

Definition at line 127 of file meshlod.h.


Constructor & Destructor Documentation

csStaticLODFactoryMesh::csStaticLODFactoryMesh  
 

constructor.


Member Function Documentation

virtual void csStaticLODFactoryMesh::GetLOD iSharedVariable *&    varm,
iSharedVariable *&    vara
const [inline, virtual]
 

Return the variables used by lod.

If lod was not set using variables then varm and vara will be set to 0.

Implements iLODControl.

Definition at line 151 of file meshlod.h.

virtual void csStaticLODFactoryMesh::GetLOD float &    m,
float &    a
const [virtual]
 

Get the current LOD function.

Implements iLODControl.

int csStaticLODFactoryMesh::GetLODCount   [inline]
 

Get number of lod levels we have.

Definition at line 169 of file meshlod.h.

References csArray::Length.

virtual int csStaticLODFactoryMesh::GetLODPolygonCount float    lod const [inline, 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.

Implements iLODControl.

Definition at line 156 of file meshlod.h.

csArray<iMeshFactoryWrapper*>& csStaticLODFactoryMesh::GetMeshesForLOD int    lod [inline]
 

Get the mesh array for the numerical lod.

Definition at line 159 of file meshlod.h.

References csArray::Length, and csArray::SetLength.

virtual void csStaticLODFactoryMesh::SetLOD iSharedVariable   varm,
iSharedVariable   vara
[virtual]
 

Set LOD using variables.

Implements iLODControl.

virtual void csStaticLODFactoryMesh::SetLOD float    m,
float    a
[virtual]
 

Set a parameters for a function to compute LOD for the given LOD control.

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.

Implements iLODControl.


The documentation for this class was generated from the following file:
Generated for Crystal Space by doxygen 1.2.14