#include <dustydriver.h>
Public Member Functions | |
| DustyDriver (irr::IrrlichtDevice *device) | |
| Constructor creates the timeserver, randnum generator, and task tree. | |
| virtual | ~DustyDriver () |
| Destructor, drops all objects. | |
| DustyEngine::RandGen * | GetRandGen () |
| GetRandGen returns a pointer to the random number generator. | |
| DustyEngine::TaskTree * | GetTaskTree () |
| GetTaskTree returns a pointer to the task tree. | |
| irr::IrrlichtDevice * | GetIrrlichtDevice () |
| Returns a pointer to the irrlicht device used by this driver. | |
| Entity * | 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 | 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 * | GetEntityByNode (irr::scene::ISceneNode *node) |
| Returns a pointer to the entity that is set to control the given node. | |
Private Attributes | |
| irr::IrrlichtDevice * | irrDevice |
| DustyEngine::RandGen * | randGen |
| DustyEngine::TaskTree * | taskTree |
| irr::core::list< Entity * > | entities |
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 creates the timeserver, randnum generator, and task tree.
|
|
|
Destructor, drops all objects.
|
|
|
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.
|
|
|
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.
|
|
|
Returns a pointer to the entity that is set to control the given node.
|
|
|
Returns a pointer to the irrlicht device used by this driver.
Definition at line 76 of file dustydriver.h. |
|
|
GetRandGen returns a pointer to the random number generator.
Definition at line 64 of file dustydriver.h. |
|
|
GetTaskTree returns a pointer to the task tree.
Definition at line 70 of file dustydriver.h. |
|
|
Definition at line 96 of file dustydriver.h. |
|
|
Definition at line 91 of file dustydriver.h. |
|
|
Definition at line 93 of file dustydriver.h. |
|
|
Definition at line 94 of file dustydriver.h. |
1.4.6-NO