CrystalSpace

Public API Reference

iTerrainRenderer Struct Reference

Provides an interface for custom rendering. More...

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainRenderer:

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 iTerrainCellRenderProperties This object will be stored in the cell.
virtual void DisconnectTerrain (iTerrainSystem *system)=0
 Disconnect from a given terrain system.
virtual CS::Graphics::RenderMesh ** GetRenderMeshes (int &n, iRenderView *rview, iMovable *movable, uint32 frustum_mask, const csArray< iTerrainCell * > &cells)=0
 Render the visible cells.
virtual void OnAlphaMapUpdate (iTerrainCell *cell, iMaterialWrapper *material, iImage *alphaMap)=0
 Indicate that the cells alpha-map matching a given material have changed and that the renderer should update its internal structures.
virtual void OnMaterialMaskUpdate (iTerrainCell *cell, size_t materialIdx, const csRect &rectangle, const unsigned char *materialMap, size_t pitch)=0
 Indicates that the cells 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 OnMaterialMaskUpdate (iTerrainCell *cell, const csRect &rectangle, const unsigned char *materialMap, size_t pitch)=0
 Indicates that the cells 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 457 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 iTerrainCellRenderProperties 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 CS::Graphics::RenderMesh** 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::OnAlphaMapUpdate ( iTerrainCell cell,
iMaterialWrapper material,
iImage alphaMap 
) [pure virtual]

Indicate that the cells alpha-map matching a given material have changed and that the renderer should update its internal structures.

Parameters:
cell cell with changed data
material material
alphaMap the alpha map
virtual void iTerrainRenderer::OnMaterialMaskUpdate ( iTerrainCell cell,
size_t  materialIdx,
const csRect rectangle,
const unsigned char *  materialMap,
size_t  pitch 
) [pure virtual]

Indicates that the cells 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
materialIdx specific material index
rectangle rectangle that was updated
materialMap the updated material map
pitch data pitch
virtual void iTerrainRenderer::OnMaterialMaskUpdate ( iTerrainCell cell,
const csRect rectangle,
const unsigned char *  materialMap,
size_t  pitch 
) [pure virtual]

Indicates that the cells 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
rectangle rectangle that was updated
materialMap the updated material map
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 2.1 by doxygen 1.6.1