Crystal Space: iLODControl Struct Reference (Crystal Space Public API Reference)

| ## Public API Reference

- Main Page
- Modules
- Namespaces
- Classes
- Files
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# iLODControl Struct Reference
[Mesh support]

The iLODControl interface represents an object that has controllable LOD features. More...

`#include <iengine/lod.h>`

Inheritance diagram for iLODControl:

[legend]
List of all members.

## Public Member Functions
virtual void | GetLOD (iSharedVariable *&varm, iSharedVariable *&vara) const =0
| Return the variables used by lod.
virtual void | GetLOD (float &m, float &a) const =0
| Get the current LOD function.
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 LOD using variables.
virtual void | SetLOD (float m, float a)=0
| Set a parameters for a function to compute LOD for the given LOD control.

## Detailed Description

The iLODControl interface represents an object that has controllable 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 variables used by lod.

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

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

Get the current LOD function.

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 LOD using variables.

virtual void iLODControl::SetLOD | ( | float | m,
|  | float | a |
| ) |  |  | `[pure 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.

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

- iengine/lod.h