PVLEGame Class Reference

Base class for a PVLE game. More...

#include <PVLEGame.h>

Inheritance diagram for PVLEGame:

Inheritance graph
[legend]

List of all members.

Public Member Functions

 PVLEGame (osg::Group *pParentGroup, Physics::Space *pParentSpace)
virtual C3DPhycreate3DPhy (const std::string &name)
 Allocates, constructs and add in scene a 3DPhy of the given type. This methos should be redifined in subclasses in order to create any needed object in the game.
Physics-only parameters.
These parameters are read on the physics thread.

float getFriendlyFire () const
void setFriendlyFire (float value)
 Usually in [0;1], but can be >1 (for physchopats !).
Teams
void addTeam (PVLETeam *pTeam)
PVLETeamgetTeam (UINT index)
const PVLETeamgetTeam (UINT index) const
UINT getNbTeams ()

Protected Attributes

float friendlyFire
 Parameter needed for Ammo class.
std::vector< osg::ref_ptr
< PVLETeam > > 
vTeamsList
 Maximum number of teams is dependant of the map.


Detailed Description

Base class for a PVLE game.

Todo:
Must be thread safe (?)

Definition at line 38 of file PVLEGame.h.


Constructor & Destructor Documentation

PVLEGame::PVLEGame ( osg::Group *  pParentGroup,
Physics::Space pParentSpace 
) [inline]

Definition at line 40 of file PVLEGame.h.


Member Function Documentation

void PVLEGame::addTeam ( PVLETeam pTeam  )  [inline]

Definition at line 56 of file PVLEGame.h.

References PVLETeam::pGame, and vTeamsList.

virtual C3DPhy* PVLEGame::create3DPhy ( const std::string &  name  )  [inline, virtual]

Allocates, constructs and add in scene a 3DPhy of the given type. This methos should be redifined in subclasses in order to create any needed object in the game.

Definition at line 43 of file PVLEGame.h.

float PVLEGame::getFriendlyFire (  )  const [inline]

Definition at line 49 of file PVLEGame.h.

References friendlyFire.

Referenced by Ammo::hitAfter(), and Explosion::hitBefore().

UINT PVLEGame::getNbTeams (  )  [inline]

Definition at line 60 of file PVLEGame.h.

References vTeamsList.

const PVLETeam* PVLEGame::getTeam ( UINT  index  )  const [inline]

Definition at line 59 of file PVLEGame.h.

References vTeamsList.

PVLETeam* PVLEGame::getTeam ( UINT  index  )  [inline]

Definition at line 58 of file PVLEGame.h.

References vTeamsList.

void PVLEGame::setFriendlyFire ( float  value  )  [inline]

Usually in [0;1], but can be >1 (for physchopats !).

Definition at line 50 of file PVLEGame.h.

References ASSERT, and friendlyFire.


Member Data Documentation

float PVLEGame::friendlyFire [protected]

Parameter needed for Ammo class.

Definition at line 64 of file PVLEGame.h.

Referenced by getFriendlyFire(), and setFriendlyFire().

std::vector<osg::ref_ptr<PVLETeam> > PVLEGame::vTeamsList [protected]

Maximum number of teams is dependant of the map.

Definition at line 65 of file PVLEGame.h.

Referenced by addTeam(), getNbTeams(), and getTeam().


The documentation for this class was generated from the following file:

Generated on Sun Jan 17 11:39:29 2010 for PVLE (Pro-Vocation Light Engine) by  doxygen 1.5.9