Kaim::BaseShortcutTrajectory Class Reference

Kaim::BaseShortcutTrajectory Class Referenceabstract

#include <baseshortcuttrajectory.h>

Class Description

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). BaseShortcutTrajectory is the non-templated abstract base class of the concrete ShortcutTrajectory<TraverseLogic>

Inherits Kaim::RefCountBase< C, Stat >.

Inherited by Kaim::ShortcutTrajectory< TraverseLogic >.

Functions

 BaseShortcutTrajectory (Trajectory *trajectory)
 
virtual ~BaseShortcutTrajectory ()=0
 
void Compute (KyFloat32 simulationTimeInSeconds, KyUInt32 worldUpdateIdx)
 
void Clear ()
 
void ClearTrajectory ()
 
const Vec3fGetTrajectoryTarget () const
 
void ForceTargetToTargetOnPath ()
 
void ForceTargetToPosition (const Vec3f &forcedTarget)
 

For internal use only

Trajectorym_trajectory
 
ShortcutTrajectoryConfig m_config
 
Ptr< IAvoidanceComputerm_avoidanceComputer
 
TargetOnPath m_targetOnPath
 
Vec3f m_target
 
KyUInt32 m_updateLastUpdateIdx
 
ShortcutMode m_shortcutMode
 
ShortcutMode m_prevShortcutMode
 
KyUInt32 m_trajectoryComputeModeLastUpdateIdx
 
bool m_useTargetProvidedByUser
 
bool m_useMinimalTargetUpdate
 
bool m_visualDebugBlobSent
 
BotGetBot () const
 
void SendVisualDebugBlob (VisualDebugServer &visualDebugServer, VisualDebugSendChangeEvent changeEvent)
 
void RemoveAllVisualDebugBeforeTrajectoryChange (VisualDebugServer &visualDebugServer)
 
void InitTargetOnPathIfNeeded ()
 
void UpdateTarget (KyFloat32 simulationTimeInSeconds, KyUInt32 worldUpdateIdx)
 
ShortcutMode GetShortcutMode (KyUInt32 worldUpdateIdx)
 
bool CanUseTargetOnPath () const
 
virtual KyResult ComputeTargetOnPath (KyFloat32 simulationTimeInSeconds)=0
 
virtual KyResult ComputeTargetOnPathOnNavMeshOnly (TargetOnPath &targetOnPath, KyFloat32 simulationTimeInSeconds, ComputeTargetOnPathSearchControl forwardSearchControl) const =0
 
bool WillUpdatePathFollowThisFrame (KyFloat32 simulationTimeInSeconds, KyUInt32 worldUpdateIdx, KyUInt32 updatePeriod)
 

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