CrystalSpace

Public API Reference

iTerrainFactory Struct Reference

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

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainFactory:

List of all members.

Public Member Functions

virtual iTerrainFactoryCellAddCell ()=0
 Add cell to the terrain.
virtual iTerrainFactoryCellAddCell (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 iTerrainFactoryCellGetCell (const char *name)=0
 Get a cell in this factory by name.
virtual iTerrainFactoryCellGetCell (size_t index)=0
 Get a cell in this factory.
virtual size_t GetCellCount ()=0
 Get number of cells in this factory.
virtual iTerrainColliderGetCollider ()=0
 Get collider for the whole terrain.
virtual iTerrainFactoryCellGetDefaultCell ()=0
 Get pseudo-cell with default settings for all cells.
virtual iTerrainDataFeederGetFeeder ()=0
 Set feeder for the whole terrain.
virtual size_t GetMaxLoadedCells ()=0
 Get maximum number of loaded cells.
virtual iTerrainRendererGetRenderer ()=0
 Get renderer for the whole terrain.
virtual void RemoveCell (iTerrainFactoryCell *)=0
 Remove the given cell from this factory.
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 1589 of file terrain2.h.


Member Function Documentation

virtual iTerrainFactoryCell* iTerrainFactory::AddCell (  )  [pure virtual]

Add cell to the terrain.

Returns:
added cell If you change the renderer, collider or feeder after adding cells you might get into trouble.
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 iTerrainFactoryCell* iTerrainFactory::GetCell ( const char *  name  )  [pure virtual]

Get a cell in this factory by name.

virtual iTerrainFactoryCell* iTerrainFactory::GetCell ( size_t  index  )  [pure virtual]

Get a cell in this factory.

virtual size_t iTerrainFactory::GetCellCount (  )  [pure virtual]

Get number of cells in this factory.

virtual iTerrainCollider* iTerrainFactory::GetCollider (  )  [pure virtual]

Get collider for the whole terrain.

virtual iTerrainFactoryCell* iTerrainFactory::GetDefaultCell (  )  [pure virtual]

Get pseudo-cell with default settings for all cells.

virtual iTerrainDataFeeder* iTerrainFactory::GetFeeder (  )  [pure virtual]

Set feeder for the whole terrain.

virtual size_t iTerrainFactory::GetMaxLoadedCells (  )  [pure virtual]

Get maximum number of loaded cells.

Parameters:
number maximum number of loaded cells
virtual iTerrainRenderer* iTerrainFactory::GetRenderer (  )  [pure virtual]

Get renderer for the whole terrain.

virtual void iTerrainFactory::RemoveCell ( iTerrainFactoryCell  )  [pure virtual]

Remove the given cell from this factory.

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 2.0 by doxygen 1.6.1