Kaim::ShortcutTrajectory< TraverseLogic > Class Template Reference

Kaim::ShortcutTrajectory< TraverseLogic > Class Template Reference

#include <shortcuttrajectory.h>

Class Description

template<class TraverseLogic>
class Kaim::ShortcutTrajectory< TraverseLogic >

This class computes minimal trajectory made of just one velocity.

It can be configured to:

  • either always goes straight towards target on path at maxSpeed (when Avoidance is disabled)
  • or delegate to an IAvoidanceComputer the computation of a velocity compatible with surrounding moving obstacles and bots (when Avoidance is enabled).

NOTE: It should not be instantiated directly. It is in fact a sub-component of Trajectory

Inherits Kaim::BaseShortcutTrajectory.

Public Member Functions

void Compute (KyFloat32 simulationTimeInSeconds)
 
void Clear ()
 
void ClearTrajectory ()
 
const Vec3fGetTrajectoryTarget () const
 
void ForceTargetToTargetOnPath ()
 
void ForceTargetToPosition (const Vec3f &forcedTarget)
 

For internal use only

BotGetBot () const
 
void SendVisualDebugBlob (VisualDebugServer &visualDebugServer, VisualDebugSendChangeEvent changeEvent)
 
void RemoveAllVisualDebugBeforeTrajectoryChange (VisualDebugServer &visualDebugServer)
 
void UpdateTarget (KyFloat32 simulationTimeInSeconds)
 
void InitTargetOnPathIfNeeded ()
 
void UpdateTrajectoryComputeMode ()
 
ShortcutTrajectoryComputeMode GetComputeModeToApply () const
 
bool CanUseTargetOnPath () const
 
void ComputeStraightTrajectory (KyFloat32 simulationTimeInSeconds)
 
void ComputeAvoidanceTrajectory (KyFloat32 simulationTimeInSeconds)
 
void ComputeSnapOnPathTrajectory (KyFloat32 simulationTimeInSeconds)
 
Trajectorym_trajectory
 
ShortcutTrajectoryConfig m_config
 
Ptr< IAvoidanceComputerm_avoidanceComputer
 
TargetOnPath m_targetOnPath
 
bool m_useTargetProvidedByUser
 
Vec3f m_target
 
KyUInt32 m_lastUpdateIdx
 
ShortcutTrajectoryComputeMode m_trajectoryComputeMode
 
bool m_useMinimalTargetUpdate
 
bool m_visualDebugBlobSent
 

Public Member Functions

 ShortcutTrajectory (Trajectory *trajectory)
 

For internal use only

virtual KyResult ComputeTargetOnPath (KyFloat32 simulationTimeInSeconds)
 
virtual bool IsShortcutTrajectoryAllowingToSkipPathFollowingThisFrame (KyFloat32 &simulationTimeInSeconds)
 
virtual KyResult ComputeTargetOnPathOnNavMeshOnly (TargetOnPath &targetOnPath, KyFloat32 simulationTimeInSeconds, ComputeTargetOnPathSearchControl forwardSearchControl) const
 

The documentation for this class was generated from the following files: