The game world interface, specified as an ABC so that is can be used without linked (module-local) implementation. More...
#include "GameWorld.hpp"
Public Member Functions | |
virtual | ~GameWorldI () |
The virtual destructor, so that derived classes can safely be deleted via a GameWorldI (base class) pointer. More... | |
virtual cf::GameSys::GameI * | GetGame ()=0 |
Returns the game that this is a world of. More... | |
virtual cf::ClipSys::ClipWorldT & | GetClipWorld ()=0 |
Returns the clip world for the game world. More... | |
virtual PhysicsWorldT & | GetPhysicsWorld ()=0 |
Returns the physics world for the game world. More... | |
virtual Vector3fT | GetAmbientLightColorFromBB (const BoundingBox3T< double > &Dimensions, const VectorT &Origin) const =0 |
Returns a "good" ambient light color for an arbitrary object (i.e. More... | |
virtual const ArrayT< unsigned long > & | GetAllEntityIDs () const =0 |
Returns (a reference to) an array that contains the IDs of all entities that currently exist in the world. More... | |
virtual IntrusivePtrT < GameEntityI > | GetGameEntityByID (unsigned long EntityID) const =0 |
Returns a pointer to the entity with ID 'EntityID'. More... | |
virtual void | RemoveEntity (unsigned long EntityID)=0 |
Removes the entity identified by 'EntityID' from the (server) world. More... | |
virtual const CafuModelT * | GetModel (const std::string &FileName) const =0 |
Returns a model for the given filename. More... | |
virtual cf::GuiSys::GuiResourcesT & | GetGuiResources () const =0 |
Returns the GUI resources that are commonly used in this game world. More... | |
The game world interface, specified as an ABC so that is can be used without linked (module-local) implementation.
The engine provides each entity that it creates with a pointer to an implementation of this interface (as entities can be created on the client and the server side, there can be more than one implementation). See the GameI::CreateGameEntityFrom*() methods for the "source" of these pointers: When one of these methods is called, a pointer to a GameWorldI is one of the parameters.
|
inlinevirtual |
The virtual destructor, so that derived classes can safely be deleted via a GameWorldI (base class) pointer.
However, with GameWorldIs that's never supposed to happen, so this destructor only exists to silence the g++ compiler warning.
|
pure virtual |
Returns (a reference to) an array that contains the IDs of all entities that currently exist in the world.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns a "good" ambient light color for an arbitrary object (i.e.
a model) of size Dimensions at Origin. The return value is derived from the worlds lightmap information "close" to the Dimensions at Origin.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns the clip world for the game world.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns the game that this is a world of.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns a pointer to the entity with ID 'EntityID'.
NULL is returned if that entity does not exist.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns the GUI resources that are commonly used in this game world.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns a model for the given filename.
The returned model instance is managed by the GameWorldI implementation in a ModelManagerT, thus the caller does not have to (and if fact, must not) delete the CafuModelT instance.
Implemented in Ca3DEWorldT.
|
pure virtual |
Returns the physics world for the game world.
Implemented in Ca3DEWorldT.
|
pure virtual |
Removes the entity identified by 'EntityID' from the (server) world.
Implemented in CaClientWorldT, and CaServerWorldT.