#include <flock.h>
Public Member Functions | |
Flock (irr::IrrlichtDevice *d, irr::f32 size, const irr::c8 *boidMeshFile, irr::scene::ISceneNode *parent, irr::s32 id=0, const irr::core::vector3df &position=irr::core::vector3df(0, 0, 0)) | |
~Flock () | |
void | update (irr::u32 deltaTime) |
Boid * | addBoid (irr::core::vector3df position, const irr::c8 *boidMeshFile) |
void | removeBoid (Boid *b) |
void | removeBoids (void) |
irr::s32 | getBoidCount (void) |
virtual void | OnPreRender () |
Is called by scenemanager right in front of render(). | |
virtual void | render () |
virtual const irr::core::aabbox3d< irr::f32 > & | getBoundingBox () const |
virtual irr::video::SMaterial & | getMaterial (irr::s32 i) |
virtual irr::s32 | getMaterialCount (void) |
void | setScale (irr::f32 scale) |
irr::core::list< Boid * > & | getBoidList (void) |
void | setSeparationWeight (irr::s32 weight) |
irr::s32 | getSeparationWeight (void) |
void | setAlignmentWeight (irr::s32 weight) |
irr::s32 | getAlignmentWeight (void) |
void | setCohesionWeight (irr::s32 weight) |
irr::s32 | getCohesionWeight (void) |
void | setNeighborRadius (irr::s32 radius) |
irr::s32 | getNeighborRadius (void) |
void | setTarget (irr::core::vector3df target) |
irr::core::vector3df | getTarget (void) |
void | setSeekTargetWeight (irr::s32 weight) |
irr::s32 | getSeekTargetWeight (void) |
void | setTornadoWeight (irr::s32 weight) |
irr::s32 | getTornadoWeight (void) |
FlockAnimators can do funny things with Flock. Animators are attached and detached at runtime. Multiple Animators can be attached at same time. Every active Animator will add a little amount of velocity to each Boid of a Flock.
Definition at line 13 of file flock.h.
|
Constructor.
|
|
Destructor. Removes Flock and all its Boid from scene. Also attached Animators are deleted. Definition at line 37 of file flock.cpp. References Debug::log(), and removeBoids(). |
|
Adds an additional Boid to this Flock.
|
|
Gets weight of Flock separation behavior.
|
|
|
|
Used by FlockAnimators to iterate through all Boid. |
|
Implementation of IsceneNode interface.
|
|
Gets weight of Flock separation behavior.
|
|
Implementation of IsceneNode interface.
|
|
Implementation of IsceneNode interface.
|
|
Gets radius where Boid can search other Boid as neighbors.
|
|
Gets weight of Flock seekness behavior.
|
|
Gets weight of Flock separation behavior.
|
|
Gets target where Boid should seek to.
|
|
Gets weight of Flock tornado behavior.
|
|
Is called by scenemanager right in front of render(). Implementation of IsceneNode interface. |
|
Removes a Boid from this Flock.
|
|
Removes all Boid from this Flock. This is called from Destructor, you do not have to do this.
Definition at line 81 of file flock.cpp. Referenced by ~Flock(). |
|
Implementation of IsceneNode interface. Renders the node. |
|
Sets weight of Flock alignment behavior.
Referenced by StateTerrain::entry(). |
|
Sets weight of Flock cohesion behavior.
Referenced by StateTerrain::entry(). |
|
Sets radius where Boid can search other Boid as neighbors.
Referenced by StateTerrain::entry(). |
|
Rescales mesh aof all Boid.
Referenced by StateTerrain::entry(). |
|
Sets weight of target seekness behavior.
Referenced by StateTerrain::entry(). |
|
Sets weight of Flock separation behavior.
Referenced by StateTerrain::entry(). |
|
Sets target where Boid should seek to.
Referenced by StateTerrain::entry(). |
|
Sets weight of tornado behavior.
Referenced by StateTerrain::entry(). |
|
Call this every frame to update each Boid of this Flock. Also the bounding box of this Flock will be calculated.
|