OpenMoHAA 0.82.1
Loading...
Searching...
No Matches
LegacyPather Class Reference

Legacy navigation system. More...

#include <navigation_legacy_path.h>

Inheritance diagram for LegacyPather:
IPather LightClass

Public Member Functions

virtual void FindPath (const Vector &start, const Vector &end, const PathSearchParameter &parameters) override
 Find and set the path from start to end.
 
virtual void FindPathNear (const Vector &start, const Vector &end, float radius, const PathSearchParameter &parameters) override
 Find and set the path from start to end with the specified goal radius.
 
virtual void FindPathAway (const Vector &start, const Vector &avoid, const Vector &preferredDir, float radius, const PathSearchParameter &parameters) override
 Find and set the path away from the specified origin.
 
virtual bool TestPath (const Vector &start, const Vector &end, const PathSearchParameter &parameters) override
 Returns true if the path exists, false otherwise.
 
virtual void UpdatePos (const Vector &origin) override
 Update path movement.
 
virtual void Clear () override
 Clear the path.
 
virtual PathNav GetNode (unsigned int index) const override
 Return the node at the specified index (0 = first node, and nodecount - 1 = last node).
 
virtual int GetNodeCount () const override
 Return the number of nodes.
 
virtual Vector GetCurrentDelta () const override
 Return the current move delta.
 
virtual Vector GetCurrentDirection () const override
 Return the directional vector towards the path.
 
virtual Vector GetDestination () const override
 Return the final destination.
 
virtual bool HasReachedGoal (const Vector &origin) const override
 Return true if the origin is at the end of the goal.
 
virtual bool IsQuerying () const override
 Return true if the path is currently being calculated.
 
- Public Member Functions inherited from LightClass
void * operator new (size_t s)
 
void operator delete (void *ptr)
 
void * operator new (size_t size, void *placement)
 
void operator delete (void *ptr, void *placement)
 
template<typename T>
void * operator new (size_t size, T &placement)
 
template<typename T>
void operator delete (void *ptr, T &placement)
 

Additional Inherited Members

- Static Public Member Functions inherited from IPather
static IPatherCreatePather ()
 Create a new Pather object based on supported navigation features.
 

Detailed Description

Legacy navigation system.

It uses the legacy navigate algorithm from the old game, which uses manually placed PathNode. It's a wrapper to ActorPath.

Member Function Documentation

◆ Clear()

void LegacyPather::Clear ( )
overridevirtual

Clear the path.

Implements IPather.

◆ FindPath()

void LegacyPather::FindPath ( const Vector & start,
const Vector & end,
const PathSearchParameter & parameters )
overridevirtual

Find and set the path from start to end.

Parameters
startStart of the path.
endEnd of the path
parameters

Implements IPather.

◆ FindPathAway()

void LegacyPather::FindPathAway ( const Vector & start,
const Vector & avoid,
const Vector & preferredDir,
float radius,
const PathSearchParameter & parameters )
overridevirtual

Find and set the path away from the specified origin.

Parameters
startStart of the path
avoidLocation to avoid
preferredDirPreferred direction to use to escape from the location to avoid
radiusMinimum safe distance to avoid
parameters

Implements IPather.

◆ FindPathNear()

void LegacyPather::FindPathNear ( const Vector & start,
const Vector & end,
float radius,
const PathSearchParameter & parameters )
overridevirtual

Find and set the path from start to end with the specified goal radius.

Parameters
startStart of the path
endEnd of the path
radiusThe radius at which to stop the path
parameters

Implements IPather.

◆ GetCurrentDelta()

Vector LegacyPather::GetCurrentDelta ( ) const
overridevirtual

Return the current move delta.

Returns
Vector with the current move delta.

Implements IPather.

◆ GetCurrentDirection()

Vector LegacyPather::GetCurrentDirection ( ) const
overridevirtual

Return the directional vector towards the path.

Returns
Vector with the current directional vector.

Implements IPather.

◆ GetDestination()

Vector LegacyPather::GetDestination ( ) const
overridevirtual

Return the final destination.

Returns
Vector the destination.

Implements IPather.

◆ GetNode()

PathNav LegacyPather::GetNode ( unsigned int index) const
overridevirtual

Return the node at the specified index (0 = first node, and nodecount - 1 = last node).

Parameters
index
Returns
A copy of the path information.

Implements IPather.

◆ GetNodeCount()

int LegacyPather::GetNodeCount ( ) const
overridevirtual

Return the number of nodes.

Returns
The number of nodes. If 0, then there is no path.

Implements IPather.

◆ HasReachedGoal()

bool LegacyPather::HasReachedGoal ( const Vector & origin) const
overridevirtual

Return true if the origin is at the end of the goal.

Parameters
originThe current origin to test

Implements IPather.

◆ IsQuerying()

bool LegacyPather::IsQuerying ( ) const
overridevirtual

Return true if the path is currently being calculated.

Returns
true
false

Implements IPather.

◆ TestPath()

bool LegacyPather::TestPath ( const Vector & start,
const Vector & end,
const PathSearchParameter & parameters )
overridevirtual

Returns true if the path exists, false otherwise.

Parameters
startStart of the path.
endEnd of the path
parameters
Returns
true if the path exists

Implements IPather.

◆ UpdatePos()

void LegacyPather::UpdatePos ( const Vector & origin)
overridevirtual

Update path movement.

Parameters
originThe origin to set

Implements IPather.


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