CrystalSpace

Public API Reference

iTerrainFactory Struct Reference

Provides an interface for creating terrain system. More...

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainFactory:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual
iTerrainFactoryCell
AddCell (const char *name, int gridWidth, int gridHeight, int materialMapWidth, int materialMapHeight, bool materiaMapPersistent, const csVector2 &position, const csVector3 &size)=0
 Add cell to the terrain.
virtual void SetAutoPreLoad (bool mode)=0
 Set automatic preload flag.
virtual void SetCollider (iTerrainCollider *collider)=0
 Set desired collider (there is a single collider for the whole terrain).
virtual void SetFeeder (iTerrainDataFeeder *feeder)=0
 Set desired feeder (there is a single feeder for the whole terrain).
virtual void SetMaxLoadedCells (size_t number)=0
 Set maximum number of loaded cells.
virtual void SetRenderer (iTerrainRenderer *renderer)=0
 Set desired renderer (there is a single renderer for the whole terrain).
virtual void SetVirtualViewDistance (float distance)=0
 Set virtual view distance, that is, the distance from camera, at which the cells are preloaded.


Detailed Description

Provides an interface for creating terrain system.

Definition at line 1172 of file terrain2.h.


Member Function Documentation

virtual iTerrainFactoryCell* iTerrainFactory::AddCell ( const char *  name,
int  gridWidth,
int  gridHeight,
int  materialMapWidth,
int  materialMapHeight,
bool  materiaMapPersistent,
const csVector2 position,
const csVector3 size 
) [pure virtual]

Add cell to the terrain.

Parameters:
name optional cell name
grid_width grid width. It will be changed to match the grid width requirements. See iTerrainCell::GetGridWidth
grid_height grid height. It will be changed to match the grid height requirements. See iTerrainCell::GetGridHeight
material_width material map width
material_height material map height
material_persistent true if you want to store material data (that makes updating material data faster and makes material data lock read/write, but it means larger memory overhead)
position cell object-space position
size cell object-space size and height scale
Returns:
added cell If you change the renderer, collider or feeder after adding cells you might get into trouble.

virtual void iTerrainFactory::SetAutoPreLoad ( bool  mode  )  [pure virtual]

Set automatic preload flag.

Parameters:
mode new automatic preload flag

virtual void iTerrainFactory::SetCollider ( iTerrainCollider collider  )  [pure virtual]

Set desired collider (there is a single collider for the whole terrain).

Parameters:
collider new collider

virtual void iTerrainFactory::SetFeeder ( iTerrainDataFeeder feeder  )  [pure virtual]

Set desired feeder (there is a single feeder for the whole terrain).

Parameters:
feeder new feeder

virtual void iTerrainFactory::SetMaxLoadedCells ( size_t  number  )  [pure virtual]

Set maximum number of loaded cells.

See iTerrainSystem::SetMaxLoadedCells

Parameters:
number maximum number of loaded cells

virtual void iTerrainFactory::SetRenderer ( iTerrainRenderer renderer  )  [pure virtual]

Set desired renderer (there is a single renderer for the whole terrain).

Parameters:
renderer new renderer

virtual void iTerrainFactory::SetVirtualViewDistance ( float  distance  )  [pure virtual]

Set virtual view distance, that is, the distance from camera, at which the cells are preloaded.

Parameters:
distance new virtual view distance


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