Steeriously  0.1
 All Classes Namespaces Functions Variables Typedefs Enumerations Pages
BehaviorData.hpp
1 #ifndef BEHAVIORDATA_HPP
2 #define BEHAVIORDATA_HPP
3 
4 #include <steeriously/Utilities.hpp>
5 #include <steeriously/Vector2.hpp>
6 #include <steeriously/VectorMath.hpp>
7 
8 namespace steer
9 {
15  {
16  none = 0x00000,
17  seek = 0x00002,
18  flee = 0x00004,
19  arrive = 0x00008,
20  wander = 0x00010,
21  cohesion = 0x00020,
22  separation = 0x00040,
23  alignment = 0x00080,
24  obstacleAvoidance = 0x00100,
25  wallAvoidance = 0x00200,
26  followPath = 0x00400,
27  pursuit = 0x00800,
28  evade = 0x01000,
29  interpose = 0x02000,
30  hide = 0x04000,
31  flock = 0x08000,
32  offsetPursuit = 0x10000,
33  };
34 
40  {
41  slow = 3,
42  normal = 2,
43  fast = 1
44  };
45 
51  {
52  weightedSum = 1,
53  prioritized = 2,
54  dithered = 3
55  };
56 
62  {
63  steer::Vector2 position = steer::Vector2(0.0, 0.0);
64  steer::Vector2 velocity = steer::Vector2(0.0, 0.0);
65  steer::Vector2 heading = steer::Vector2(1.0, 1.0);
67  float radius = 50.f;
68  float mass = 1.f;
69 
70  unsigned int NumAgents = 1;
71  float neighborhoodRadius = 100.f;
72  float SafeDistance = 100.f;
73  float ThreatRange = 100.f;
74  Uint32 deceleration = steer::Deceleration::fast;
75  float DecelerationTweaker = 0.3f;
76  Uint32 SummingMethod = steer::summingMethod::weightedSum;
77 
78  unsigned int NumObstacles = 2;
79  float MinObstacleRadius = 10;
80  float MaxObstacleRadius = 30;
81 
82  float SteeringForceTweaker = 200.f;
83 
84  float SteeringForce = 2.f;
85  float MaxSpeed = 100.f;
86  float MaxForce = 400.f;
87  float MaxTurnRate = 10.f;
88  float VehicleMass = 1.f;
89  float VehicleScale = 1.f;
90 
91  float SeparationWeight = 1.f;
92  float AlignmentWeight = 10.f;
93  float CohesionWeight = 10.f;
94  float ObstacleAvoidanceWeight = 10.f;
95  float WallAvoidanceWeight = 20.f;
96  float WanderWeight = 2.f;
97  float SeekWeight = 1.f;
98  float FleeWeight = 1.f;
99  float ArriveWeight = 1.f;
100  float PursuitWeight = 1.f;
101  float OffsetPursuitWeight = 1.f;
102  float InterposeWeight = 1.f;
103  float HideWeight = 1.f;
104  float EvadeWeight = 0.01f;
105  float FollowPathWeight = 10.f;
106 
107  // Originally constants, these were used by the original source to set parameters for the wandering behavior.
108  // The radius of the constraining circle for the wander behavior
109  float wanderRadius = 100.f;
110  // Distance the wander circle is projected in front of the agent
111  float wanderDistance = 0.001f;
112  // The maximum amount of displacement along the circle each frame
113  float wanderJitterPerSecond = 360.f;
114  // Used in path following
115  float waypointSeekDistance = 20.f;
116  float waypointSeekDistanceSquared = waypointSeekDistance*waypointSeekDistance;
117 
118  float ViewDistance = 100.f;
119 
120  float MinDetectionBoxLength = 40.f;
121 
122  float WallDetectionFeelerLength = 40.f;
123  };
124 }
125 
126 #endif // BEHAVIORDATA_HPP
127