CrystalSpace

Public API Reference

Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

iFoliageObject Struct Reference

A representation of an object in the foliage mesh. More...

#include <imesh/foliage.h>

Inheritance diagram for iFoliageObject:

iBase List of all members.

Public Member Functions

virtual csPtr< iFoliageGeometryCreateGeometry (size_t lodslot)=0
 Create a new geometry for this object at the specified LOD slot.
virtual csPtr< iFoliageGeometryCreateGeometryLOD (size_t fromslot, size_t toslot, float factor)=0
 After setting the geometry for specific lod slots you can use this function to automatically create the geometry for a missing LOD slots by using a triangle reduction algorithm.
virtual iFoliageGeometryGetGeometry (size_t lodslot)=0
 Get the geometry at the specified lodslot.
virtual iLODControlGetLODControl ()=0
 Return the LOD control for this object.
virtual size_t GetMaxLodSlot () const =0
 Get the maximum lodslot number that has been used by this object.
virtual const char * GetName () const =0
 Get the name of this object.

Detailed Description

A representation of an object in the foliage mesh.

An object represents geometry at different LOD levels (using iFoliageGeometry).

Definition at line 94 of file foliage.h.


Member Function Documentation

virtual csPtr<iFoliageGeometry> iFoliageObject::CreateGeometry size_t  lodslot  )  [pure virtual]
 

Create a new geometry for this object at the specified LOD slot.

Note that this function can also be used to replace geometry that is already in that slot.

Parameters:
lodslot is number (>=0) with 0 meaning low detail.

virtual csPtr<iFoliageGeometry> iFoliageObject::CreateGeometryLOD size_t  fromslot,
size_t  toslot,
float  factor
[pure virtual]
 

After setting the geometry for specific lod slots you can use this function to automatically create the geometry for a missing LOD slots by using a triangle reduction algorithm.

Parameters:
fromslot is the source mesh to use for the reduction.
toslot is where the new geometry must be placed.
factor is a number between 0 and 1 indicating how many triangles must remain. 0 means none, and 1 means all.

virtual iFoliageGeometry* iFoliageObject::GetGeometry size_t  lodslot  )  [pure virtual]
 

Get the geometry at the specified lodslot.

Parameters:
lodslot is number (>=0) with 0 meaning low detail.
Returns:
0 in case there is no geometry at this slot.

virtual iLODControl* iFoliageObject::GetLODControl  )  [pure virtual]
 

Return the LOD control for this object.

virtual size_t iFoliageObject::GetMaxLodSlot  )  const [pure virtual]
 

Get the maximum lodslot number that has been used by this object.

Returns ~0 in case there is no geometry yet.

virtual const char* iFoliageObject::GetName  )  const [pure virtual]
 

Get the name of this object.


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