CrystalSpace

Public API Reference

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

iTerrainObjectState Struct Reference

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

#include <terrain.h>

Inheritance diagram for iTerrainObjectState:

iBase List of all members.

Public Methods

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 (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 void SetLODDistance (float distance)=0
 The distance at which splatting is no longer in effect and the base texture is the only layer.

virtual void SetErrorTolerance (float error)=0
 Sets the screenspace error tolerance in numbers of pixels.

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.


Detailed Description

This will override the settings for material in the parent.

Definition at line 39 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::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::SetErrorTolerance float    error [pure virtual]
 

Sets 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.

virtual void iTerrainObjectState::SetLODDistance float    distance [pure virtual]
 

The distance at which splatting is no longer in effect and the base texture is the only layer.

virtual bool iTerrainObjectState::SetMaterialMap 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.


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