CrystalSpace

Public API Reference

Main Page   Modules   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

iTerrFuncState Struct Reference

This interface describes the API for the terrain object. More...

#include <terrfunc.h>

Inheritance diagram for iTerrFuncState:

iBase List of all members.

Public Methods

virtual void LoadMaterialGroup (iLoaderContext *ldr_context, const char *pName, int iStart, int iEnd)=0
 Load a group of materials from a given loader context.

virtual void SetTopLeftCorner (const csVector3 &topleft)=0
 Set the top-left corner of the terrain.

virtual void SetScale (const csVector3 &scale)=0
 Set the scale of the terrain.

virtual csVector3 GetScale ()=0
 Get the scale of the terrain.

virtual void SetResolution (int x, int y)=0
 Setup the number of blocks in the terrain.

virtual int GetXResolution ()=0
 Get the x resolution.

virtual int GetYResolution ()=0
 Get the y resolution.

virtual void SetGridResolution (int x, int y)=0
 Setup the number of grid points in every block for the base mesh.

virtual int GetXGridResolution ()=0
 Get the x resolution for a block.

virtual int GetYGridResolution ()=0
 Get the y resolution for a block.

virtual void SetColor (const csColor &col)=0
 Set the base color.

virtual csColor GetColor () const=0
 Get the base color.

virtual void SetHeightFunction (iTerrainHeightFunction *func)=0
 Set the function to use for the terrain.

virtual void SetNormalFunction (iTerrainNormalFunction *func)=0
 Set the normal function to use for the terrain.

virtual void SetHeightMap (iImage *im, float hscale, float hshift, bool flipx=false, bool flipy=false)=0
 Use the given iImage to get a height function from.

virtual iTerrainHeightFunctionGetHeightFunction () const=0
 Get the function to use for the terrain.

virtual iTerrainNormalFunctionGetNormalFunction () const=0
 Get the normal function to use for the terrain.

virtual void SetLODDistance (int lod, float dist)=0
 Set the distance at which to switch to the given lod level (lod from 1 to 3).

virtual float GetLODDistance (int lod)=0
 Get the distance at which lod will switch to that level.

virtual void SetMaximumLODCost (int lod, float maxcost)=0
 Set the maximum cost for LOD level (1..3).

virtual float GetMaximumLODCost (int lod)=0
 Get the maximum cost for LOD level (1..3).

virtual void CorrectSeams (int tw, int th)=0
 Correct texture mapping so that no seams will appear with textures of the given size.

virtual void GetCorrectSeams (int &tw, int &th) const=0
 Get texture size for which seams will be corrected.

virtual void SetQuadDepth (int qd)=0
 Set the depth of the quad-tree used for visibility testing.

virtual int GetQuadDepth () const=0
 Get the depth of the quad-tree used for visibility testing.

virtual void SetVisTesting (bool en)=0
 Disable/enable visibility testing.

virtual bool IsVisTestingEnabled ()=0
 Return true if vis testing is enabled.


Detailed Description

This interface describes the API for the terrain object.

Definition at line 62 of file terrfunc.h.


Member Function Documentation

virtual void iTerrFuncState::CorrectSeams int    tw,
int    th
[pure virtual]
 

Correct texture mapping so that no seams will appear with textures of the given size.

By default this is 0,0 so no correction will happen.

virtual csColor iTerrFuncState::GetColor   [pure virtual]
 

Get the base color.

virtual void iTerrFuncState::GetCorrectSeams int &    tw,
int &    th
const [pure virtual]
 

Get texture size for which seams will be corrected.

virtual iTerrainHeightFunction* iTerrFuncState::GetHeightFunction   [pure virtual]
 

Get the function to use for the terrain.

virtual float iTerrFuncState::GetLODDistance int    lod [pure virtual]
 

Get the distance at which lod will switch to that level.

virtual float iTerrFuncState::GetMaximumLODCost int    lod [pure virtual]
 

Get the maximum cost for LOD level (1..3).

virtual iTerrainNormalFunction* iTerrFuncState::GetNormalFunction   [pure virtual]
 

Get the normal function to use for the terrain.

virtual int iTerrFuncState::GetQuadDepth   [pure virtual]
 

Get the depth of the quad-tree used for visibility testing.

virtual csVector3 iTerrFuncState::GetScale   [pure virtual]
 

Get the scale of the terrain.

virtual int iTerrFuncState::GetXGridResolution   [pure virtual]
 

Get the x resolution for a block.

virtual int iTerrFuncState::GetXResolution   [pure virtual]
 

Get the x resolution.

virtual int iTerrFuncState::GetYGridResolution   [pure virtual]
 

Get the y resolution for a block.

virtual int iTerrFuncState::GetYResolution   [pure virtual]
 

Get the y resolution.

virtual bool iTerrFuncState::IsVisTestingEnabled   [pure virtual]
 

Return true if vis testing is enabled.

virtual void iTerrFuncState::LoadMaterialGroup iLoaderContext   ldr_context,
const char *    pName,
int    iStart,
int    iEnd
[pure virtual]
 

Load a group of materials from a given loader context.

virtual void iTerrFuncState::SetColor const csColor   col [pure virtual]
 

Set the base color.

virtual void iTerrFuncState::SetGridResolution int    x,
int    y
[pure virtual]
 

Setup the number of grid points in every block for the base mesh.

virtual void iTerrFuncState::SetHeightFunction iTerrainHeightFunction   func [pure virtual]
 

Set the function to use for the terrain.

virtual void iTerrFuncState::SetHeightMap iImage   im,
float    hscale,
float    hshift,
bool    flipx = false,
bool    flipy = false
[pure virtual]
 

Use the given iImage to get a height function from.

virtual void iTerrFuncState::SetLODDistance int    lod,
float    dist
[pure virtual]
 

Set the distance at which to switch to the given lod level (lod from 1 to 3).

virtual void iTerrFuncState::SetMaximumLODCost int    lod,
float    maxcost
[pure virtual]
 

Set the maximum cost for LOD level (1..3).

virtual void iTerrFuncState::SetNormalFunction iTerrainNormalFunction   func [pure virtual]
 

Set the normal function to use for the terrain.

virtual void iTerrFuncState::SetQuadDepth int    qd [pure virtual]
 

Set the depth of the quad-tree used for visibility testing.

virtual void iTerrFuncState::SetResolution int    x,
int    y
[pure virtual]
 

Setup the number of blocks in the terrain.

virtual void iTerrFuncState::SetScale const csVector3   scale [pure virtual]
 

Set the scale of the terrain.

virtual void iTerrFuncState::SetTopLeftCorner const csVector3   topleft [pure virtual]
 

Set the top-left corner of the terrain.

virtual void iTerrFuncState::SetVisTesting bool    en [pure virtual]
 

Disable/enable visibility testing.


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