iMeshGeneratorGeometry Struct Reference
[Crystal Space 3D Engine]
This interface defines one piece of geometry for the mesh generator.
More...
#include <iengine/meshgen.h>
Inheritance diagram for iMeshGeneratorGeometry:

Public Member Functions | |
virtual void | AddDensityMaterialFactor (iMaterialWrapper *material, float factor)=0 |
Add a density factor based on a material. | |
virtual void | AddFactory (iMeshFactoryWrapper *factory, float maxdist)=0 |
Add a factory and the maximum distance after which this factory will no longer be used. | |
virtual float | GetDensity () const =0 |
Get the density. | |
virtual iMeshFactoryWrapper * | GetFactory (size_t idx)=0 |
Get a specified factory. | |
virtual size_t | GetFactoryCount () const =0 |
Get the number of factories for this geometry. | |
virtual float | GetMaximumDistance (size_t idx)=0 |
Get a specified maximum distance. | |
virtual float | GetRadius () const =0 |
Get the radius for this object. | |
virtual void | RemoveFactory (size_t idx)=0 |
Remove a factory. | |
virtual void | SetDefaultDensityMaterialFactor (float factor)=0 |
Set the default factor to use in case the material found on the meshes is not any of the ones defined in the material factory table. | |
virtual void | SetDensity (float density)=0 |
Set the density. | |
virtual void | SetRadius (float radius)=0 |
Set the radius for this object. |
Detailed Description
This interface defines one piece of geometry for the mesh generator.
Definition at line 40 of file meshgen.h.
Member Function Documentation
|
Add a density factor based on a material. The base density will be used to try a number of positions in every cell. Then for that position it will determine the material that is hit. If that material is listed in the density factor table then that factor will be used to determine if the position should be used or not. Setting a factor of 0 here will disable the material. Setting a factor of 1 will give full density. |
|
Add a factory and the maximum distance after which this factory will no longer be used. The minimum distance will be calculated from the maximum distance used for other factories in this geometry. |
|
Get the density.
|
|
Get a specified factory.
|
|
Get the number of factories for this geometry.
|
|
Get a specified maximum distance.
|
|
Get the radius for this object.
|
|
Remove a factory.
|
|
Set the default factor to use in case the material found on the meshes is not any of the ones defined in the material factory table. By default the default factor is 0. This means that as soon as you use SetDensityMaterialFactor() above then on every material that is not listed there will be no foliage generated. The default factor is NOT used in case the material factor table is empty. |
|
Set the density. The density is defined as the number of objects in every 1x1 square. Default density is 1. @@ TODO: add density map support. |
|
Set the radius for this object. No other objects will be generated within this radius. If this radius is 0 then there is no limitation on object generation (i.e. objects can be put on top of each other if the random generator decides to do that). Default is 0. |
The documentation for this struct was generated from the following file:
- iengine/meshgen.h
Generated for Crystal Space by doxygen 1.4.6