Main Page | Class Hierarchy | Class List | Directories | File List | Class Members | Related Pages

GraphicManager Class Reference

#include <graphicmanager.h>

List of all members.

Public Member Functions

const uint GetSelection (const uint &rcuiWinX, const uint &rcuiWinY) const
void DisplayTerrain (const uint &rcuiW, const uint &rcuiL) const
void DisplayStructure (const Structure *pcStructure, const uint &rcuiW, const uint &rcuiL) const
void DisplayGC (const OPENCITY_GRAPHIC_CODE &enumGC, const uint &rcuiW, const uint &rcuiL) const
void DisplayTerrainHighlight (const uint &rcuiW, const uint &rcuiL, const OPENCITY_TOOL_CODE &enumTool) const
void DisplayStructureHighlight (const Structure *pcStructure, const uint &rcuiW, const uint &rcuiL, const OPENCITY_TOOL_CODE &enumTool) const
void DisplayTerrainSelection (const uint &rcuiW, const uint &rcuiL, const uint &rcuiID) const
void DisplayStructureSelection (const Structure *pcStructure, const uint &rcuiW, const uint &rcuiL, const uint &rcuiID) const
void Display (const OC_FLOAT &rcfW, const OC_FLOAT &rcfL, const OC_FLOAT &rcfH, const Movement *const pm) const
void DisplayAgent (float x, float y, const Agent *const pAgent) const

Private Attributes

ModeltabpModel [OC_GRAPHIC_CODE_MAX]
 A table of Model pointers.


Detailed Description

It handles the rendering of 3d objects
See also:
Renderer

Definition at line 36 of file graphicmanager.h.


Member Function Documentation

void GraphicManager::Display const OC_FLOAT &  rcfW,
const OC_FLOAT &  rcfL,
const OC_FLOAT &  rcfH,
const Movement *const   pm
const
 

This is a special function used for movement (vehicle) rendering

Definition at line 524 of file graphicmanager.cpp.

References Movement::_fRX, Movement::_fRY, Movement::_fRZ, Movement::_fTX, Movement::_fTY, Movement::_fTZ, Model::DisplayList(), Movement::GetGraphicCode(), and tabpModel.

void GraphicManager::DisplayGC const OPENCITY_GRAPHIC_CODE &  enumGC,
const uint &  rcuiW,
const uint &  rcuiL
const
 

Display a graphic code at the specified map coordinates

Parameters:
enumGC must be a valid graphic code
rcuiW,rcuiL the map (W,L) coordinates of the graphism

Definition at line 340 of file graphicmanager.cpp.

References Model::DisplayList(), Map::GetSquareHeight(), GlobalVar::gpMapMgr, and tabpModel.

Referenced by Renderer::DisplayBuildPreview().

void GraphicManager::DisplayStructure const Structure pcStructure,
const uint &  rcuiW,
const uint &  rcuiL
const
 

Display a the structure thanks to its graphic code.

Parameters:
pcStructure points to the structure to display. ( != NULL )
rcuiW,rcuiL the map (W,L) coordinates of the structure

Definition at line 189 of file graphicmanager.cpp.

References Model::Display2(), Model::DisplayList(), Structure::GetGraphicCode(), Structure::GetLevel(), Map::GetSquareHeight(), GlobalVar::gpMapMgr, and tabpModel.

Referenced by Renderer::Display().

void GraphicManager::DisplayTerrain const uint &  rcuiW,
const uint &  rcuiL
const
 

Display a terrain square, there should be no structure on it. This method does take care about the height of the terrain.

Definition at line 129 of file graphicmanager.cpp.

References Map::GetSquareHeight(), and GlobalVar::gpMapMgr.

const uint GraphicManager::GetSelection const uint &  rcuiWinX,
const uint &  rcuiWinY
const
 

Get the ObjectId at the specified window's coordinates

Returns:
uint == the ObjectId previously displayed

Definition at line 93 of file graphicmanager.cpp.


The documentation for this class was generated from the following files:
Generated on Sat Nov 11 10:21:11 2006 for OpenCity by  doxygen 1.4.2