DustyEngine::AABBCollisionTask Class Reference

AABBCollosionTask allows for checking of collisions between nodes based upon the nodes' axis-aligned bounding boxes. More...

#include <dustyAABBcollisiontask.h>

Inheritance diagram for DustyEngine::AABBCollisionTask:

DustyEngine::DummyTask DustyEngine::Task List of all members.

Public Member Functions

 AABBCollisionTask ()
 ~AABBCollisionTask ()
void AddNode (irr::scene::ISceneNode *node)
void RemoveNode (irr::scene::ISceneNode *node)
irr::core::list< DustyEngine::AABBCollision > * GetCollisions ()
void ClearCollisions ()
 ClearCollisions() clears the list of collisions that have occured. This should be called after collision checking has been handled.
void OnUpdate ()
 OnUpdate() is called by the TaskTree when the time has come to execute the task's code.

Protected Attributes

irr::core::list< irr::scene::ISceneNode * > nodes
irr::core::list< DustyEngine::AABBCollisioncollisions

Detailed Description

AABBCollosionTask allows for checking of collisions between nodes based upon the nodes' axis-aligned bounding boxes.

This task can be used for easy testing to see whether any of a group of nodes have collided with each other. It uses a list of nodes, and each update it tests those nodes against each other. It attempts to prevent having redundant collisions, IE, node A collides with node B, and also node B collides with node A. This task attempts to only report when node A collides with node B, without registering the same collision twice. However, the collisions provided should be checked for redundancy.

Definition at line 23 of file dustyAABBcollisiontask.h.


Constructor & Destructor Documentation

DustyEngine::AABBCollisionTask::AABBCollisionTask  ) 
 

DustyEngine::AABBCollisionTask::~AABBCollisionTask  ) 
 


Member Function Documentation

void DustyEngine::AABBCollisionTask::AddNode irr::scene::ISceneNode *  node  )  [inline]
 

AddNode() adds a node to the list of nodes which will checked for collisions against each other.

Parameters:
node,: The node to add to the list of collideable nodes.

Definition at line 32 of file dustyAABBcollisiontask.h.

void DustyEngine::AABBCollisionTask::ClearCollisions  )  [inline]
 

ClearCollisions() clears the list of collisions that have occured. This should be called after collision checking has been handled.

Definition at line 49 of file dustyAABBcollisiontask.h.

irr::core::list<DustyEngine::AABBCollision>* DustyEngine::AABBCollisionTask::GetCollisions  )  [inline]
 

GetCollisions() returns a pointer to the list of all collisions which occured during the last update.

Returns:
Returns a pointer to a list, which contains AABBCollision structures of each collision which occured.

Definition at line 43 of file dustyAABBcollisiontask.h.

void DustyEngine::AABBCollisionTask::OnUpdate  )  [virtual]
 

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.

void DustyEngine::AABBCollisionTask::RemoveNode irr::scene::ISceneNode *  node  ) 
 

RemoveNode() removes a node from the list of nodes to be collided.

Parameters:
node,: The node to remove from the collideable node list.


Member Data Documentation

irr::core::list<DustyEngine::AABBCollision> DustyEngine::AABBCollisionTask::collisions [protected]
 

Definition at line 58 of file dustyAABBcollisiontask.h.

irr::core::list<irr::scene::ISceneNode*> DustyEngine::AABBCollisionTask::nodes [protected]
 

Definition at line 57 of file dustyAABBcollisiontask.h.


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