CrystalSpace

Public API Reference

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

iTerrainObjectState Struct Reference

This will override the settings for material in the parent. More...

#include <imesh/terrain.h>

Inheritance diagram for iTerrainObjectState:

iBase List of all members.

Public Member Functions

virtual bool SetMaterialPalette (const csArray< iMaterialWrapper * > &pal)=0
 Set/Get the material palette, this is used to specify materials on a bytemap representing the material makeup of the terrain.
virtual bool SetMaterialMap (const csArray< char > &data, int x, int y)=0
 In short, the materialmap paints the palette onto the terrain like an indexed image format paints a color palette onto the screen It sets the materials per pixel in the material map.
virtual bool SetLODValue (const char *parameter, float value)=0
 Set a LOD parameter.
virtual float GetLODValue (const char *parameter) const =0
 Get a LOD parameter.
virtual bool SaveState (const char *filename)=0
 Save/Restore preprocessing information, the algorithm will do some preprocessing based on the material and height information this allows the process to be saved out to a file and cached for later reuse (maybe this should be the caching system) In some cases it may actually memorymap this file.
virtual int CollisionDetect (iMovable *m, csTransform *p)=0
 Detects collision with a specific transform.
virtual void SetStaticLighting (bool enable)=0
 Enable or disable the use of static lighting.
virtual bool GetStaticLighting ()=0
 Retrieve whether static lighting is enabled.
virtual void SetCastShadows (bool enable)=0
 Enable or disable shadow casting by this terrain mesh.
virtual bool GetCastShadows ()=0
 Retrieve whether shadow casting is enabled.

Detailed Description

This will override the settings for material in the parent.

Definition at line 41 of file terrain.h.


Member Function Documentation

virtual int iTerrainObjectState::CollisionDetect iMovable m,
csTransform p
[pure virtual]
 

Detects collision with a specific transform.

virtual bool iTerrainObjectState::GetCastShadows  )  [pure virtual]
 

Retrieve whether shadow casting is enabled.

virtual float iTerrainObjectState::GetLODValue const char *  parameter  )  const [pure virtual]
 

Get a LOD parameter.

virtual bool iTerrainObjectState::GetStaticLighting  )  [pure virtual]
 

Retrieve whether static lighting is enabled.

virtual bool iTerrainObjectState::SaveState const char *  filename  )  [pure virtual]
 

Save/Restore preprocessing information, the algorithm will do some preprocessing based on the material and height information this allows the process to be saved out to a file and cached for later reuse (maybe this should be the caching system) In some cases it may actually memorymap this file.

virtual void iTerrainObjectState::SetCastShadows bool  enable  )  [pure virtual]
 

Enable or disable shadow casting by this terrain mesh.

virtual bool iTerrainObjectState::SetLODValue const char *  parameter,
float  value
[pure virtual]
 

Set a LOD parameter.

The following parameters can be used:

  • "lod distance" - The distance at which splatting is no longer in effect and the base texture is the only layer.
  • "error tolerance" - The screenspace error tolerance in numbers of pixels. Error will be less than the given tolerance so setting the tolerance to values less than 1 is worthless.
Returns:
Whether the value was accepted by the terrain object.

virtual bool iTerrainObjectState::SetMaterialMap const csArray< char > &  data,
int  x,
int  y
[pure virtual]
 

In short, the materialmap paints the palette onto the terrain like an indexed image format paints a color palette onto the screen It sets the materials per pixel in the material map.

If x and y are not equal to the heightmap the materialmap will scale accordingly. If they are equal than the material map will map a single material to a single high level quad in the final terrain. Note x and y must be 2^n and usually they must be equal

virtual bool iTerrainObjectState::SetMaterialPalette const csArray< iMaterialWrapper * > &  pal  )  [pure virtual]
 

Set/Get the material palette, this is used to specify materials on a bytemap representing the material makeup of the terrain.

virtual void iTerrainObjectState::SetStaticLighting bool  enable  )  [pure virtual]
 

Enable or disable the use of static lighting.


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