CrystalSpace

Public API Reference

iTerrainRenderer Struct Reference

Provides an interface for custom rendering. More...

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainRenderer:

Inheritance graph
[legend]

List of all members.

Public Member Functions

virtual void ConnectTerrain (iTerrainSystem *system)=0
 Connect to a given terrain system.
virtual csPtr
< iTerrainCellRenderProperties
CreateProperties ()=0
 Create an object that implements iTerrainCellCollisionProperties This object will be stored in the cell.
virtual void DisconnectTerrain (iTerrainSystem *system)=0
 Disconnect from a given terrain system.
virtual csRenderMesh ** GetRenderMeshes (int &n, iRenderView *rview, iMovable *movable, uint32 frustum_mask, const csArray< iTerrainCell * > cells)=0
 Render the visible cells.
virtual void OnMaterialMaskUpdate (iTerrainCell *cell, size_t material, const csRect &rectangle, const unsigned char *data, size_t pitch)=0
 Indicates that the cell's material mask has been changed (while unlocking the cell material map data either by a feeder or by a user- provided functions or while setting the new mask with the respective functions), and that the renderer should update its internal structures to reflect the changes.
virtual void OnMaterialPaletteUpdate (const csTerrainMaterialPalette &material_palette)=0
 Indicates that the material palette has been changed, and that the renderer should update its internal structures to reflect the changes.


Detailed Description

Provides an interface for custom rendering.

Definition at line 341 of file terrain2.h.


Member Function Documentation

virtual void iTerrainRenderer::ConnectTerrain ( iTerrainSystem system  )  [pure virtual]

Connect to a given terrain system.

Setup any per-terrain render data

virtual csPtr<iTerrainCellRenderProperties> iTerrainRenderer::CreateProperties (  )  [pure virtual]

Create an object that implements iTerrainCellCollisionProperties This object will be stored in the cell.

This function gets invoked at cells creation.

Returns:
properties object

virtual void iTerrainRenderer::DisconnectTerrain ( iTerrainSystem system  )  [pure virtual]

Disconnect from a given terrain system.

virtual csRenderMesh** iTerrainRenderer::GetRenderMeshes ( int &  n,
iRenderView rview,
iMovable movable,
uint32  frustum_mask,
const csArray< iTerrainCell * >  cells 
) [pure virtual]

Render the visible cells.

Parameters:
n output value, that will contain the size of the resulting mesh array
rview view that was used for rendering
movable the terrain object
frustum_mask frustum mask
cells array with visible cells
cell_count number of visible cells
Returns:
array of render meshes

virtual void iTerrainRenderer::OnMaterialMaskUpdate ( iTerrainCell cell,
size_t  material,
const csRect rectangle,
const unsigned char *  data,
size_t  pitch 
) [pure virtual]

Indicates that the cell's material mask has been changed (while unlocking the cell material map data either by a feeder or by a user- provided functions or while setting the new mask with the respective functions), and that the renderer should update its internal structures to reflect the changes.

Parameters:
cell cell with the changed data
material material index
rectangle rectangle that was updated
data height data
pitch data pitch

virtual void iTerrainRenderer::OnMaterialPaletteUpdate ( const csTerrainMaterialPalette material_palette  )  [pure virtual]

Indicates that the material palette has been changed, and that the renderer should update its internal structures to reflect the changes.

Parameters:
material_palette new material palette


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