Kaim::LivePath Class Reference

#include <livepath.h>

Class Description

This class aggregates a Path and all runtime related stuff namely the PathValidityInterval.

It is in charge of:

  • computing a new Path (using its IPathFinderQuery) and switching the Path when a Path computation is done (you can alternately directly inject a Path computed outside),
  • maintaining runtime information up to date with regards to the NavData streaming (either due to explicit streaming or to dynamic NavMesh).

Public Member Functions

void InjectUserPath (Path *newPath)
 Calls SetPath() to inject newPath and set m_newPathSource to PathSource_UserInjected. More...
 
void InjectPathFromPathFinderQueryOnDone (Path *newPath)
 Calls SetPath() to inject newPath and set m_newPathSource to Called internally by the Bot or by the LivePath, you should not need to call this function. More...
 
void ReplaceCurrentPathWithNewPath ()
 This method is called to properly switch between the currently followed Path and the new one freshly set. More...
 

Main API Functions

 LivePath ()
 
 ~LivePath ()
 
void Clear ()
 
bool IsComputingNewPath () const
 Returns true if a path computation has been launched with the PathFinderQuery and the followed path has not been replaced by the result path yet. More...
 
bool NeedToReplaceCurrentPathWithNewPath () const
 Returns whether or not a new Path has been set and is ready to be followed. More...
 

Getters

PathGetFollowedPath () const
 
PathSource GetFollowedPathSource () const
 
PathValidityStatus GetPathValidityStatus () const
 
const PathEventListGetPathEventList () const
 
ChannelArrayGetChannelArray () const
 
PathEventListGetPathEventList ()
 
UpperBoundType GetUpperBoundType () const
 

Path Following Control

void ForceValidityIntervalRecompute ()
 Call this method to force an update of the PathValidityInterval. More...
 

For internal use only

Botm_bot
 
Ptr< LivePathOnPathCalculated > m_onPathCalculated
 
Ptr< Pathm_followedPath
 
Ptr< Pathm_newPath
 The new Path that has just been set. More...
 
PathSource m_pathType
 The source of the current Path. More...
 
PathSource m_newPathSource
 The source of the new Path that has just been set. More...
 
PathFinderQueryStatus m_pathFinderQueryStatus
 
PathValidityInterval m_validityInterval
 
bool m_needToSendLivePathBlob
 (VisualDebug) Avoids sending all the active KyGuid each frame. Accessed by the Bot. More...
 

Member Function Documentation

void Kaim::LivePath::ForceValidityIntervalRecompute ( )
inline

Call this method to force an update of the PathValidityInterval.

This is already called through Bot when NavData did change nearby the Path.

void Kaim::LivePath::InjectPathFromPathFinderQueryOnDone ( Path newPath)
inline

Calls SetPath() to inject newPath and set m_newPathSource to Called internally by the Bot or by the LivePath, you should not need to call this function.

void Kaim::LivePath::InjectUserPath ( Path newPath)
inline

Calls SetPath() to inject newPath and set m_newPathSource to PathSource_UserInjected.

Called internally by the Bot, you should not need to call this function.

bool Kaim::LivePath::IsComputingNewPath ( ) const
inline

Returns true if a path computation has been launched with the PathFinderQuery and the followed path has not been replaced by the result path yet.

bool Kaim::LivePath::NeedToReplaceCurrentPathWithNewPath ( ) const
inline

Returns whether or not a new Path has been set and is ready to be followed.

void Kaim::LivePath::ReplaceCurrentPathWithNewPath ( )

This method is called to properly switch between the currently followed Path and the new one freshly set.

This is called in Bot::ReplaceFollowedPathWithNewPath() when a new Path has been detected and the path follower is ready for Path switch (done in BasePathProgressComputer::Update)

Member Data Documentation

bool Kaim::LivePath::m_needToSendLivePathBlob

(VisualDebug) Avoids sending all the active KyGuid each frame. Accessed by the Bot.

Ptr<Path> Kaim::LivePath::m_newPath

The new Path that has just been set.

PathSource Kaim::LivePath::m_newPathSource

The source of the new Path that has just been set.

PathSource Kaim::LivePath::m_pathType

The source of the current Path.


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