DustyEngine::DustyDriver Class Reference

DustyDriver class is the driver object for DustyEngine. More...

#include <dustydriver.h>

List of all members.

Public Member Functions

 DustyDriver (irr::IrrlichtDevice *device)
 Constructor creates the timeserver, randnum generator, and task tree.
virtual ~DustyDriver ()
 Destructor, drops all objects.
DustyEngine::RandGenGetRandGen ()
 GetRandGen returns a pointer to the random number generator.
DustyEngine::TaskTreeGetTaskTree ()
 GetTaskTree returns a pointer to the task tree.
irr::IrrlichtDevice * GetIrrlichtDevice ()
 Returns a pointer to the irrlicht device used by this driver.
EntityCreateEntity ()
 This function creates a new entity in Dusty Engine. It should be used to create all entities, an entity should never be created with new because this function makes sure Dusty Engine cleans up after itself. It returns a pointer to the new entity.
void DestroyEntity (Entity *e)
 This function immediately destroys the given entity, removing all tasks of that entity from the task tree. If the entity is set to remove the scene node it controls when it's destroyed, it is removed here.
EntityGetEntityByNode (irr::scene::ISceneNode *node)
 Returns a pointer to the entity that is set to control the given node.

Private Attributes

irr::IrrlichtDevice * irrDevice
DustyEngine::RandGenrandGen
DustyEngine::TaskTreetaskTree
irr::core::list< Entity * > entities


Detailed Description

DustyDriver class is the driver object for DustyEngine.

The DustyDriver class creates all the core objects used by the engine: The time server, the random number generator (the RNG is not integral but included for ease,) and the task tree. Each of those objects could be created independently, but the DustyDriver makes their creation and use much simpler by placing them all in one object.

Definition at line 52 of file dustydriver.h.


Constructor & Destructor Documentation

DustyEngine::DustyDriver::DustyDriver irr::IrrlichtDevice *  device  ) 
 

Constructor creates the timeserver, randnum generator, and task tree.

Parameters:
device,: An Irrlicht device, needed to initialize the other objects.

virtual DustyEngine::DustyDriver::~DustyDriver  )  [virtual]
 

Destructor, drops all objects.


Member Function Documentation

Entity* DustyEngine::DustyDriver::CreateEntity  ) 
 

This function creates a new entity in Dusty Engine. It should be used to create all entities, an entity should never be created with new because this function makes sure Dusty Engine cleans up after itself. It returns a pointer to the new entity.

void DustyEngine::DustyDriver::DestroyEntity Entity e  ) 
 

This function immediately destroys the given entity, removing all tasks of that entity from the task tree. If the entity is set to remove the scene node it controls when it's destroyed, it is removed here.

Entity* DustyEngine::DustyDriver::GetEntityByNode irr::scene::ISceneNode *  node  ) 
 

Returns a pointer to the entity that is set to control the given node.

irr::IrrlichtDevice* DustyEngine::DustyDriver::GetIrrlichtDevice  )  [inline]
 

Returns a pointer to the irrlicht device used by this driver.

Definition at line 76 of file dustydriver.h.

DustyEngine::RandGen* DustyEngine::DustyDriver::GetRandGen  )  [inline]
 

GetRandGen returns a pointer to the random number generator.

Definition at line 64 of file dustydriver.h.

DustyEngine::TaskTree* DustyEngine::DustyDriver::GetTaskTree  )  [inline]
 

GetTaskTree returns a pointer to the task tree.

Definition at line 70 of file dustydriver.h.


Member Data Documentation

irr::core::list<Entity*> DustyEngine::DustyDriver::entities [private]
 

Definition at line 96 of file dustydriver.h.

irr::IrrlichtDevice* DustyEngine::DustyDriver::irrDevice [private]
 

Definition at line 91 of file dustydriver.h.

DustyEngine::RandGen* DustyEngine::DustyDriver::randGen [private]
 

Definition at line 93 of file dustydriver.h.

DustyEngine::TaskTree* DustyEngine::DustyDriver::taskTree [private]
 

Definition at line 94 of file dustydriver.h.


The documentation for this class was generated from the following file:
Generated on Fri Jan 27 17:31:55 2006 for Dusty Engine by  doxygen 1.4.6-NO