CrystalSpace

Public API Reference

Public Member Functions
iTerrainFactory Struct Reference

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

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainFactory:
iBase

List of all members.

Public Member Functions

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 iTerrainFactoryCellAddCell ()=0
 Add cell to the terrain.
virtual iTerrainFactoryCellGetCell (size_t index)=0
 Get a cell in this factory.
virtual iTerrainFactoryCellGetCell (const char *name)=0
 Get a cell in this factory by name.
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 ( 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:
nameoptional cell name
grid_widthgrid width. It will be changed to match the grid width requirements. See iTerrainCell::GetGridWidth
grid_heightgrid height. It will be changed to match the grid height requirements. See iTerrainCell::GetGridHeight
material_widthmaterial map width
material_heightmaterial map height
material_persistenttrue 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)
positioncell object-space position
sizecell 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::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::GetCell ( size_t  index) [pure virtual]

Get a cell in this factory.

virtual iTerrainFactoryCell* iTerrainFactory::GetCell ( const char *  name) [pure virtual]

Get a cell in this factory by name.

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.

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:
numbermaximum 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:
modenew automatic preload flag
virtual void iTerrainFactory::SetCollider ( iTerrainCollider collider) [pure virtual]

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

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

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

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

Set maximum number of loaded cells.

See iTerrainSystem::SetMaxLoadedCells

Parameters:
numbermaximum 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:
renderernew 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:
distancenew virtual view distance

The documentation for this struct was generated from the following file:

Generated for Crystal Space 2.0 by doxygen 1.7.6.1