FlockAnimatorDefault Class Reference

Animates a Flock like described by Craig Reynolds "Steering Behaviors for Autonomous Characters". More...

#include <flockanimatordefault.h>

List of all members.

Public Member Functions

 FlockAnimatorDefault (irr::IrrlichtDevice *d)
 ~FlockAnimatorDefault ()
 Destructor.
void animateNode (irr::scene::ISceneNode *node, irr::u32 timeMs)
void testSpeedUp (irr::scene::ISceneNode *node)


Detailed Description

Animates a Flock like described by Craig Reynolds "Steering Behaviors for Autonomous Characters".

That is default steering behavior of a Flock. Adds its part to each Boid velocity. This is an implementation of irr::ISceneNodeAnimator interface. Other FlockAnimators will look like this class. The key is a automated call to animateNode() each frame within Irrlicht engine.

Definition at line 15 of file flockanimatordefault.h.


Constructor & Destructor Documentation

FlockAnimatorDefault::FlockAnimatorDefault irr::IrrlichtDevice *  d  ) 
 

Constructor.

Parameters:
d : An IrrlichtDevice*, needed to access?
Todo:
device not needed?


Member Function Documentation

void FlockAnimatorDefault::animateNode irr::scene::ISceneNode *  node,
irr::u32  timeMs
 

Gets called from irr::SceneManager every frame. Gets a handle to a SceneNode and thus is able to set its position, rendering, etc.

Parameters:
node : An ISceneNode* (of type Flock). All Boid of this Flock are iterated and velocity is altered.
timeMs : An unsigned integer with current virtual game time. Time based animation can be done, also start and duration of animation can be controlled with this.
Note:
Paramter "node" must be of class Flock.

void FlockAnimatorDefault::testSpeedUp irr::scene::ISceneNode *  node  ) 
 

Same as animateNode() but way faster. Removes three iterations though all Boid in seperate Functions to only one itaration.

Parameters:
node : An ISceneNode* (of type Flock). All Boid of this Flock are iterated and velocity is altered.
Note:
Paramter "node" must be of class Flock.


The documentation for this class was generated from the following files:
Generated on Sun Dec 2 17:09:58 2007 for Swarm by  doxygen 1.4.6-NO