Changeset 617 for code/branches/FICN/src/orxonox/objects/NPC.h
- Timestamp:
- Dec 18, 2007, 4:41:20 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
code/branches/FICN/src/orxonox/objects/NPC.h
r603 r617 10 10 // includes 11 11 #include "WorldEntity.h" 12 #include "Model.h" 12 13 13 14 namespace orxonox { 14 15 15 class NPC : public WorldEntity16 class NPC : public Model 16 17 { 17 NPC(); 18 virtual ~NPC(); 18 public: 19 20 NPC(); 21 virtual ~NPC(); 22 void tick(float dt); 23 void setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable); 24 25 private: 26 float getDistance(NPC* temp); 27 void calculateAcceleration(NPC** arrayOfElements); 28 Vector3 separation(NPC** arrayOfElements); 29 Vector3 alignment(NPC** arrayOfElements); 30 Vector3 cohesion(NPC** arrayOfElements); 31 32 33 private: 34 bool movable_; // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation 35 36 // those values should maybe be controlled by a higher power and should maybe be parameters that can be changed 37 static int const SEPERATIONDISTANCE = 300; //detectionradius of seperation 38 static int const ALIGNMENTDISTANCE = 300; //detectionradius of alignment 39 static int const COHESIONDISTANCE = 5000; //detectionradius of cohesion 40 static int const ANZELEMENTS = 9; //number of elements 19 41 }; 20 42
Note: See TracChangeset
for help on using the changeset viewer.