#include <ddgterrain.h>
Class diagram for ddgTerrain:
Public Members | |||
ddgTerrain () | |||
Create terrain object, but don't allocate any memory. | |||
ddgTerrain ( unsigned int r, unsigned int c ) | |||
Create and allocate memory. | |||
~ddgTerrain () | |||
Destroy terrain object. | |||
void | offset ( float x, float y, float z ) | ||
Set terrain position 0,0 in world coords. | |||
ddgVector3* | offset ( void ) | ||
Get terrain position 0,0 in world coords. | |||
void | scale ( float x, float y, float z ) | ||
Set the terrain scale in world coords. | |||
ddgVector3 | scale ( void ) | ||
Get terrain scale in world coords. | |||
unsigned int | rows ( void ) | ||
Return the number of rows in the terrain. | |||
unsigned int | cols ( void ) | ||
Return the number of columns in the terrain. | |||
void | qsize ( unsigned int q ) | ||
Size of a single quad. | |||
unsigned int | qsize (void) | ||
return quad size. | |||
void | tsize ( unsigned int t ) | ||
set terrain square size. | |||
unsigned int | tsize (void) | ||
return terrain square size. | |||
void | hfile ( char * f) | ||
Set the name of the height field file. | |||
char* | hfile (void) | ||
Return the name of the height field file. | |||
void | nfile ( char *f ) | ||
Set the name of the normal field file. | |||
char* | nfile (void) | ||
Return the name of the normal field file. | |||
void | setLOD ( unsigned int r, unsigned int c, short t) | ||
Set the Level of detail in the LOD grid. | |||
short | getLOD ( unsigned int r, unsigned int c ) | ||
Get the level of detail. | |||
short | maxLOD (void) | ||
Return the maximum LOD. | |||
bool | init ( ddgContext *ctx ) | ||
Initialize the terrain object. | |||
bool | draw ( ddgContext *ctx ) | ||
Render the terrain object. | |||
ddgHeightMap* | heights | ||
Height field. | |||
ddgImage* | normals | ||
Normal field. | |||
ddgParamSet | paramset | ||
Set of paramters to control the terrain. | |||
ddgParamB | culling | ||
Turn backface culling on/off. | |||
ddgParamB | smooth | ||
Turn smooth shading on/off. | |||
ddgParamB | debug | ||
Enable disable debug mode. | |||
ddgParamB | lod | ||
Enable disable LOD culling. | |||
ddgParam | lodFactor | ||
Factor to affect LOD cutoff points. | |||
ddgParamB | bbox | ||
Enable disable BBOX/Frustrum culling. | |||
ddgContext* | context | ||
Viewer location. | |||
int | tri | ||
Count the number of triangles drawn (debugging). | |||
int | bcount | ||
Number of boxes rendered. (debugging). | |||
ddgContext::Quality | quality | ||
Current rendering mode (for debugging). |