TerrainClient Class Reference
[Game Data]

specific terrain behavior on client More...

#include <terrain_client.h>

Inherits TerrainServer.

Inherited by TerrainGeoMipMap, TerrainRoetger, and TerrainSimple.

Inheritance diagram for TerrainClient:

Inheritance graph
[legend]
Collaboration diagram for TerrainClient:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 TerrainClient (void)
virtual void render (void)=0
 Performs rendering. [CLIENT].
virtual void update (const class Camera *camera)
 Data update (LOD-related things). [CLIENT].
virtual void init (void)
 preprocessing step - offline calculations for LOD
void loadLightmap (std::string path)
 loads lightmap texture
void loadGlobalTexture (std::string path)
 loads global texture

Protected Attributes

TextureRef mGlobalTexture
 Global, unique texture of the terrain.
TextureRef mLightmapTexture
 Lightmap texture of the terrain.

Friends

class TaskRender

Detailed Description

specific terrain behavior on client

This is an ABSTRACT class! Rendering (and possibly updating as well) should be implemented in some derived class. All terrain textures are stored on this level of terrain hierarchy.

Definition at line 22 of file terrain_client.h.


Constructor & Destructor Documentation

TerrainClient::TerrainClient void   ) 
 

Definition at line 8 of file terrain_client.cpp.


Member Function Documentation

virtual void TerrainClient::init void   )  [inline, virtual]
 

preprocessing step - offline calculations for LOD

Reimplemented from TerrainServer.

Reimplemented in TerrainGeoMipMap, and TerrainRoetger.

Definition at line 51 of file terrain_client.h.

References TerrainServer::init().

Referenced by TerrainGeoMipMap::init().

Here is the call graph for this function:

void TerrainClient::loadGlobalTexture std::string  path  ) 
 

loads global texture

Initializes global texture using TextureManager.

Parameters:
path texture path

Definition at line 17 of file terrain_client.cpp.

References Singleton< T >::getInstance(), and mGlobalTexture.

Here is the call graph for this function:

void TerrainClient::loadLightmap std::string  path  ) 
 

loads lightmap texture

Initializes lightmap texture using TextureManager.

Parameters:
path texture path

Definition at line 12 of file terrain_client.cpp.

References Singleton< T >::getInstance(), and mLightmapTexture.

Here is the call graph for this function:

virtual void TerrainClient::render void   )  [pure virtual]
 

Performs rendering. [CLIENT].

Possibly "only" sends data to OpenGL API.

Reimplemented from TerrainServer.

Implemented in TerrainGeoMipMap, TerrainRoetger, and TerrainSimple.

virtual void TerrainClient::update const class Camera camera  )  [inline, virtual]
 

Data update (LOD-related things). [CLIENT].

This is usually a *very* time consuming task. However, it should be performed once a frame, because it takes care about LOD. In good implementation, it should be time-constrained, for example by the maximal number of used triangles.

Reimplemented in TerrainGeoMipMap, and TerrainRoetger.

Definition at line 46 of file terrain_client.h.


Friends And Related Function Documentation

friend class TaskRender [friend]
 

Definition at line 27 of file terrain_client.h.


Member Data Documentation

TextureRef TerrainClient::mGlobalTexture [protected]
 

Global, unique texture of the terrain.

Definition at line 74 of file terrain_client.h.

Referenced by loadGlobalTexture(), TerrainSimple::render(), TerrainRoetger::render(), and TerrainGeoMipMap::render().

TextureRef TerrainClient::mLightmapTexture [protected]
 

Lightmap texture of the terrain.

Definition at line 75 of file terrain_client.h.

Referenced by loadLightmap().


The documentation for this class was generated from the following files:
Generated on Wed Apr 12 14:27:50 2006 for bjs by  doxygen 1.4.5