LayerGame Class Reference

world rendering, terrain updating More...

#include <layer_game.h>

Inherits Layer.

Inheritance diagram for LayerGame:

Inheritance graph
[legend]
Collaboration diagram for LayerGame:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 LayerGame ()
virtual ~LayerGame ()
virtual void render ()
 game-rendering code
virtual void update ()
 frustum calculation, LOD-update code

Private Member Functions

void initRefs (void)
 obtains references mRefs to world, landcape, etc. for easy access
const ReferencesgetRefs (void)
virtual void setView ()
 sets the projection and model-view matrix for concrete layer
void renderWorldEntities (void)
 rendering code for world entities
void renderLandscape (void)
 rendering code for landscape

Private Attributes

LayerGame::References mRefs
 some useful references

Classes

struct  References

Detailed Description

world rendering, terrain updating

Definition at line 11 of file layer_game.h.


Constructor & Destructor Documentation

LayerGame::LayerGame  )  [inline]
 

Definition at line 14 of file layer_game.h.

virtual LayerGame::~LayerGame  )  [inline, virtual]
 

Definition at line 15 of file layer_game.h.


Member Function Documentation

const References* LayerGame::getRefs void   )  [inline, private]
 

Definition at line 35 of file layer_game.h.

References mRefs.

Referenced by renderLandscape(), renderWorldEntities(), setView(), and update().

void LayerGame::initRefs void   )  [private]
 

obtains references mRefs to world, landcape, etc. for easy access

Definition at line 22 of file layer_game.cpp.

References assertL, LayerGame::References::camera, getAppClient(), GameClient::getCamera(), ApplicationClient::getGame(), World::getLandscape(), Landscape::getTerrain(), Game::getWorld(), LayerGame::References::landscape, mRefs, LayerGame::References::terrain, and LayerGame::References::world.

Referenced by render(), and update().

Here is the call graph for this function:

void LayerGame::render  )  [virtual]
 

game-rendering code

Implements Layer.

Definition at line 78 of file layer_game.cpp.

References initRefs(), renderLandscape(), renderWorldEntities(), and setView().

Here is the call graph for this function:

void LayerGame::renderLandscape void   )  [private]
 

rendering code for landscape

Definition at line 73 of file layer_game.cpp.

References getRefs(), LayerGame::References::landscape, and Landscape::render().

Referenced by render().

Here is the call graph for this function:

void LayerGame::renderWorldEntities void   )  [private]
 

rendering code for world entities

Definition at line 41 of file layer_game.cpp.

References getRefs(), World::getWorldEntitiesBegin(), World::getWorldEntitiesEnd(), World::getWorldEntity(), glDrawCube(), CommonEntity::render(), and LayerGame::References::world.

Referenced by render().

Here is the call graph for this function:

void LayerGame::setView  )  [private, virtual]
 

sets the projection and model-view matrix for concrete layer

Reimplemented from Layer.

Definition at line 122 of file layer_game.cpp.

References g_settings, Terrain::getExtents(), getRefs(), Terrain::getScale(), Settings::isTrue(), Camera::setPerspective(), Camera::setView(), and LayerGame::References::terrain.

Referenced by render().

Here is the call graph for this function:

void LayerGame::update  )  [virtual]
 

frustum calculation, LOD-update code

Reimplemented from Layer.

Definition at line 99 of file layer_game.cpp.

References LayerGame::References::camera, Camera::computeFrustum(), Camera::getDir(), getRefs(), initRefs(), Camera::setDir(), LayerGame::References::terrain, and Terrain::update().

Here is the call graph for this function:


Member Data Documentation

struct LayerGame::References LayerGame::mRefs [private]
 

some useful references

Referenced by getRefs(), and initRefs().


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