00001 #ifndef FLOCKANIMATORDEFAULT_H
00002 #define FLOCKANIMATORDEFAULT_H
00003
00004 #include "irrlicht.h"
00005
00006 class Boid;
00007 class Flock;
00008
00010
00015 class FlockAnimatorDefault : public irr::scene::ISceneNodeAnimator
00016 {
00017 public:
00018
00022 FlockAnimatorDefault(irr::IrrlichtDevice* d);
00023
00025 ~FlockAnimatorDefault();
00026
00036 void animateNode(irr::scene::ISceneNode* node, irr::u32 timeMs);
00037
00042 void testSpeedUp(irr::scene::ISceneNode* node);
00043
00044 protected:
00045
00046 private:
00047
00049 irr::core::vector3df steerForSeparation(Boid* boid, Flock* flock, irr::f32 maxDistance, irr::f32 cosMaxAngle);
00050
00052 irr::core::vector3df steerForAlignment(Boid* boid, Flock* flock, irr::f32 maxDistance, irr::f32 cosMaxAngle);
00053
00055 irr::core::vector3df steerForCohesion(Boid* boid, Flock* flock, irr::f32 maxDistance, irr::f32 cosMaxAngle);
00056
00058 irr::core::vector3df FlockAnimatorDefault::steerForSeek(Boid* boid, Flock* flock);
00059
00060 irr::IrrlichtDevice* device;
00061 };
00062
00063 #endif // FLOCKANIMATORDEFAULT_H