#include <dustynodegeneratortask.h>
Inheritance diagram for DustyEngine::NodeGeneratorTask:

Public Member Functions | |
| NodeGeneratorTask () | |
| ~NodeGeneratorTask () | |
| void | SetPosition (irr::core::vector3df position) |
| void | SetRange (irr::core::vector3df minimum, irr::core::vector3df maximum) |
| void | SetParentNode (irr::scene::IAnimatedMeshSceneNode *n) |
| void | AddMesh (irr::scene::IAnimatedMesh *m) |
| void | RemoveMesh (irr::scene::IAnimatedMesh *m) |
| void | ClearMeshes () |
| ClearMeshes clears all the meshes in the list of meshes. | |
| irr::core::array< irr::scene::IAnimatedMesh * > * | GetMeshes () |
| irr::core::list< irr::scene::IAnimatedMeshSceneNode * > * | GetNewNodes () |
| void | ClearNewNodes () |
| ClearNewNodes() clears the list of new nodes created by this task. The nodes still remain on the irrlicht scene. | |
| void | OnUpdate () |
| OnUpdate() is called by the TaskTree when the time has come to execute the task's code. | |
Protected Attributes | |
| bool | randomPosition |
| irr::scene::IAnimatedMeshSceneNode * | parentNode |
| irr::core::list< irr::scene::IAnimatedMeshSceneNode * > | createdNodes |
| irr::core::array< irr::scene::IAnimatedMesh * > | meshes |
| irr::core::vector3df | creationPosition |
| irr::core::vector3df | creationRangeMax |
| irr::core::vector3df | creationRangeMin |
NodeGeneratorTask has a list of meshes that it uses. These meshes are added using the AddMesh() method. It will choose at random a mesh to use when it creates the node. If only one mesh is supplied, it will use just that one mesh.
The nodes can be created at a specific point, or at a random position in a range of points.
If a specific point is supplied, then the generator will use that point. If a range is supplied, then it will choose points in the range. It automatically switches between a specific point and a range depending on which one was last set.
Generator nodes can be added as children of a specific parent node, as well.
Definition at line 23 of file dustynodegeneratortask.h.
|
|
|
|
|
|
|
|
If more than one mesh is in the list, it chooses a mesh at random when it creates a node. If only one mesh exists in the list, it will use that mesh. |
|
|
ClearMeshes clears all the meshes in the list of meshes. If no meshes are in the list when the task goes to add a node, it will not add a node. |
|
|
ClearNewNodes() clears the list of new nodes created by this task. The nodes still remain on the irrlicht scene. You should clear the new nodes created by the task so nodes won't be used a second time when you change them outside of the task. Definition at line 81 of file dustynodegeneratortask.h. |
|
|
GetMeshes() returns a pointer to list of meshes in the task.
Definition at line 64 of file dustynodegeneratortask.h. |
|
|
You should always clear the list of new nodes (using ClearNewNodes()) after you use the nodes that have been created. Definition at line 73 of file dustynodegeneratortask.h. |
|
|
OnUpdate() is called by the TaskTree when the time has come to execute the task's code. OnUpdate is typically the most important function. OnUpdate is only called when enough time has passed or every frame, depending upon what the priority of the task is. If you want code to execute on a time-based basis, put that code here and add the task to the tree. Reimplemented from DustyEngine::DummyTask. |
|
|
RemoveMesh removes a mesh from the list of meshes.
|
|
|
SetParentNode() sets the node which all nodes created should be a child of.
|
|
|
If this function is called, then the task will be set to create nodes at a certain position instead of within a random range. |
|
||||||||||||
|
If this function is called, then the task will be set to create nodes within the range supplied. It will do so at random positions. |
|
|
Definition at line 93 of file dustynodegeneratortask.h. |
|
|
Definition at line 96 of file dustynodegeneratortask.h. |
|
|
Definition at line 98 of file dustynodegeneratortask.h. |
|
|
Definition at line 99 of file dustynodegeneratortask.h. |
|
|
Definition at line 95 of file dustynodegeneratortask.h. |
|
|
Definition at line 91 of file dustynodegeneratortask.h. |
|
|
Definition at line 89 of file dustynodegeneratortask.h. |
1.4.6-NO