iFoliageFactoryState Struct Reference
The foliage mesh can be used to make foliage (plants, boulders, . More...
#include <imesh/foliage.h>
Inheritance diagram for iFoliageFactoryState:

Public Member Functions | |
virtual void | AddPaletteEntry (size_t typeidx, const char *objectname, float relative_density)=0 |
Add a foliage object name to a palette index. | |
virtual void | ClearPaletteType (size_t typeidx)=0 |
Clear a given palette type. | |
virtual csPtr< iFoliageObject > | CreateObject (const char *name)=0 |
Create a new foliage object. | |
virtual iFoliageObject * | FindObject (const char *name) const =0 |
Find a foliage object by name. | |
virtual const csRefArray< iFoliageObject > & | GetObjects () const =0 |
Return all foliage objects. | |
virtual const char * | GetPaletteEntry (size_t typeidx, size_t entryidx, float &relative_density)=0 |
For a given palette type and entry index, return the object name and density. | |
virtual size_t | GetPaletteEntryCount (size_t typeidx) const =0 |
For a given palette type, return the number of objects in this palette. | |
virtual size_t | GetPaletteTypeCount () const =0 |
Get the total number of palette types. | |
virtual const csBox2 & | GetSamplerRegion () const =0 |
Get the sampler region. | |
virtual iTerraFormer * | GetTerraFormer ()=0 |
Get the terraformer. | |
virtual void | SetSamplerRegion (const csBox2 ®ion)=0 |
This specifies the max region the foliage mesh will sample from (from the terraformer). | |
virtual void | SetTerraFormer (iTerraFormer *form)=0 |
The terraformer defines various properties for this foliage mesh. |
Detailed Description
The foliage mesh can be used to make foliage (plants, boulders, ...) that fits nicely with a terrain. The general API for the foliage factory. Here you define the actual geometry which is shared between all foliage mesh instances.
Main creators of instances implementing this interface:
- Foliage mesh object plugin (crystalspace.mesh.object.foliage)
- iMeshObjectType::NewFactory()
- Foliage Factory Loader plugin (crystalspace.mesh.loader.factory.foliage)
Definition at line 167 of file foliage.h.
Member Function Documentation
|
Add a foliage object name to a palette index. Palette indices are selected by the 'foliage_types' map (see SetTerraFormer()). Every foliage palette can contain zero or more object names. When a certain block in the landscape uses a specific palette index then the density given in the density map is multiplied with the normalized densities for the objects in that specific foliage palette and this will give the distribution of objects at that spot.
|
|
Clear a given palette type.
|
|
Create a new foliage object.
|
|
Find a foliage object by name.
|
|
Return all foliage objects.
|
|
For a given palette type and entry index, return the object name and density.
|
|
For a given palette type, return the number of objects in this palette.
|
|
Get the total number of palette types.
|
|
Get the sampler region.
|
|
Get the terraformer.
|
|
This specifies the max region the foliage mesh will sample from (from the terraformer).
|
|
The terraformer defines various properties for this foliage mesh. The terraformer needs to support the following properties:
|
The documentation for this struct was generated from the following file:
- imesh/foliage.h
Generated for Crystal Space by doxygen 1.4.4