gwnavruntime/pathfollower/iavoidancecomputer.h Source File
Go to the documentation of this file.
8 #ifndef Navigation_IAvoidanceComputer_H
9 #define Navigation_IAvoidanceComputer_H
30 Avoidance_NoTrajectory
36 class IAvoidanceComputer:
public RefCountBase<IAvoidanceComputer, MemStat_PathFollowing>
49 Bot& bot,
KyFloat32 simulationTimeInSeconds,
KyFloat32 desiredSpeed,
const Vec2f& movingDirection,
50 Vec2f& avoidanceVelocity, Vec2f& outputFrontDirection,
bool& collide) = 0;
52 static const char* GetAvoidanceResultString(
AvoidanceResult avoidanceResult)
54 switch(avoidanceResult)
57 return "No avoidance";
67 return "Solution not found";
69 return "Forcing passage";
71 return "Waiting for force passage";
77 static const char* GetAvoidanceResultDescription(
AvoidanceResult avoidanceResult)
79 switch(avoidanceResult)
82 return "The trajectory goes in target direction at the desired speed";
84 return "The trajectory goes in target direction but at lower speed than the desired one";
86 return "The trajectory goes in target direction but at higher speed than the desired one";
88 return "The trajectory deviates from target direction";
90 return "The avoidance computer decided that stopping the Bot is the best solution";
92 return "The avoidance computer was not able to find any collision-free solutions";
94 return "The bot decided to force the passage";
96 return "The bot is required to wait for the force passage timer to expire";
104 virtual bool IsComputationRequiredThisFrame(Bot* ,
KyFloat32 ) {
return true; }
109 #endif // Navigation_IAvoidanceComputer_H
The avoidance computer was not able to find a collision-free solution.
Definition: iavoidancecomputer.h:27
The trajectory goes in target direction at the desired speed.
Definition: iavoidancecomputer.h:22
Waiting for force passage.
Definition: iavoidancecomputer.h:29
#define KY_CLASS_WITHOUT_COPY(ClassName)
Define to forbid copy constructor and copy assignment.
Definition: types.h:387
AvoidanceResult
Enumerates the possible results of a call to IAvoidanceComputer::Compute().
Definition: iavoidancecomputer.h:20
The trajectory deviates from target direction.
Definition: iavoidancecomputer.h:25
The trajectory goes in target direction but at higher speed than the desired one. ...
Definition: iavoidancecomputer.h:24
Definition: gamekitcrowddispersion.h:20
This interface class defines the way avoidance is computed.
Definition: iavoidancecomputer.h:38
Currently forcing the passage.
Definition: iavoidancecomputer.h:28
The avoidance computer decided that stopping the Bot is the best solution.
Definition: iavoidancecomputer.h:26
The trajectory goes in target direction but at lower speed than the desired one.
Definition: iavoidancecomputer.h:23
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43