00001 #ifndef BOID_H
00002 #define BOID_H
00003
00004 #include "irrlicht.h"
00005
00007
00010 class Boid
00011 {
00012 public:
00013
00018 Boid(irr::IrrlichtDevice* d, const irr::c8* filePath);
00019
00023 Boid(irr::IrrlichtDevice* d, Boid& other);
00024
00026 ~Boid();
00027
00030 void update(irr::u32 deltaTime);
00031
00035 void setScale(irr::f32 scale);
00036
00043 bool inBoidNeighborhood(Boid* other, irr::f32 minDistance, irr::f32 maxDistance, irr::f32 cosMaxAngle);
00044
00050 void addDebugText(irr::c8* text, irr::s32 value);
00051
00054 irr::core::vector3df position;
00055
00057 irr::core::vector3df velocity;
00058
00061 irr::core::vector3df speed;
00062
00064 irr::core::vector3df forward;
00065
00068 irr::core::stringc meshFilePath;
00069
00070 protected:
00071
00072 private:
00073
00074 void loadMesh(void);
00075
00076 irr::IrrlichtDevice* device;
00077 irr::scene::IAnimatedMeshSceneNode* mesh;
00078 irr::scene::ITextSceneNode* dbgText;
00079 };
00080
00081 #endif // BOID_H