CrystalSpace

Public API Reference

Public Member Functions
iTerrainRenderer Struct Reference

Provides an interface for custom rendering. More...

#include <imesh/terrain2.h>

Inheritance diagram for iTerrainRenderer:
iBase

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, 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, 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 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

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:
noutput value, that will contain the size of the resulting mesh array
rviewview that was used for rendering
movablethe terrain object
frustum_maskfrustum mask
cellsarray with visible cells
cell_countnumber 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:
cellcell with changed data
materialmaterial
alphaMapthe alpha map
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:
cellcell with the changed data
rectanglerectangle that was updated
materialMapthe updated material map
pitchdata pitch
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:
cellcell with the changed data
materialIdxspecific material index
rectanglerectangle that was updated
materialMapthe updated material map
pitchdata 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_palettenew material palette

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

Generated for Crystal Space 2.0 by doxygen 1.7.6.1