8 #ifndef Navigation_Trajectory_H
9 #define Navigation_Trajectory_H
21 class VisualDebugServer;
22 class SplineTrajectory;
23 class BaseShortcutTrajectory;
24 class FollowedCircleArcSpline;
26 class PositionOnLivePath;
30 class Trajectory :
public RefCountBase<Trajectory, MemStat_PathFollowing>
39 void SetShortcutTrajectory(Ptr<BaseShortcutTrajectory> shortcutTrajectory);
40 void SetAvoidanceComputer(Ptr<IAvoidanceComputer> avoidanceComputer);
42 TrajectoryMode GetTrajectoryMode()
const {
return m_trajectoryMode; }
44 virtual void Compute(
KyFloat32 simulationTimeInSeconds);
46 Ptr<IAvoidanceComputer> GetAvoidanceComputer() {
return m_avoidanceComputer; }
47 Vec2f GetIdealVelocity()
const {
return m_idealVelocity; }
54 void ClearOutput(
const Vec2f& frontDirection);
58 virtual void ClearTrajectory();
60 virtual bool IsShortcutTrajectoryAllowingToSkipPathFollowingThisFrame(
KyFloat32& simulationTimeInSeconds);
65 virtual void SendVisualDebugBlob(
VisualDebugServer& visualDebugServer, VisualDebugSendChangeEvent changeEvent);
73 OutputVelocity_SlowDownToTarget,
74 OutputVelocity_FullSpeed,
79 static OutputVelocity ComputeStraightVelocityToTarget2d(
Bot* bot,
KyFloat32 simulationTimeInSeconds,
const Vec2f& target,
Vec2f& outputVelocity);
87 Ptr<IAvoidanceComputer> m_avoidanceComputer;
88 Ptr<BaseShortcutTrajectory> m_shortcutTrajectory;
89 Ptr<SplineTrajectory> m_splineTrajectory;
91 Vec2f m_idealVelocity;
99 #endif // Navigation_Trajectory_H
This class is the world element that represent an active character in Gameware Navigation.
Definition: bot.h:150
TrajectoryMode
Enum that defines the 2 possible trajectories modes.
Definition: botconfig.h:31
This class defines a two-dimensional vector whose coordinates are stored using floating-point numbers...
Definition: vec2f.h:24
Definition: gamekitcrowddispersion.h:20
#define KY_DEFINE_NEW_DELETE_OPERATORS(MemStat)
This macro defines new and delete operators.
Definition: memory.h:137
CircleArcSpline with computation information and current position of follow.
Definition: followedcirclearcspline.h:31
The VisualDebugServer manages the sending of data to clients.
Definition: visualdebugserver.h:254
This class aggregates all necessary information to describe a position on a LivePath, namely:
Definition: positiononlivepath.h:46
This class computes the trajectory either with ShortcutTrajectory or with SplineTrajectory.
Definition: trajectory.h:30
float KyFloat32
Type used internally to represent a 32-bit floating-point number.
Definition: types.h:43
static OutputVelocity ComputeStraightVelocityToTarget(Bot *bot, KyFloat32 simulationTimeInSeconds, const Vec3f &target, Vec3f &outputVelocity)
Compute a velocity to reach a particular target.
This class defines a three-dimensional vector whose coordinates are stored using floating-point numbe...
Definition: vec3f.h:23
ResetTrajectoryStatus
Definition: resettrajectorystatus.h:14