Quantum 3 3.1.0

Public Member Functions | Public Attributes | List of all members
Quantum.Navigation.PathFinder Class Reference

Navmesh TA* pathfinder class. More...

Inheritance diagram for Quantum.Navigation.PathFinder:
Quantum.Navigation.IPathFinderData

Public Member Functions

 PathFinder (Int32 openNodesSize, Int32 rawPathSize=256, RawPathAllocationStrategy rawPathAllocationStrategy=RawPathAllocationStrategy.Fixed)
 Create a pathfinder object. More...
 
 PathFinder (NavMesh navmesh, Int32 rawPathSize=256, RawPathAllocationStrategy rawPathAllocationStrategy=RawPathAllocationStrategy.Fixed)
 Create a pathfinder for a certain navmesh. More...
 
void Dispose ()
 Dispose the pathfinder object. More...
 
FindPathResult FindPath (FrameThreadSafe frame, FPVector2 start, FPVector2 end, FP automaticTargetCorrectionRadius, in NavMeshRegionMask regionMask, PathQuality quality=PathQuality.Good, long heuristicWeight=FP.RAW_ONE, NavMesh navmesh=null)
 Find path. More...
 
FindPathResult FindPath (FrameThreadSafe frame, FPVector3 start, FPVector3 end, FP automaticTargetCorrectionRadius, in NavMeshRegionMask regionMask, PathQuality quality=PathQuality.Good, long heuristicWeight=FP.RAW_ONE, NavMesh navmesh=null)
 See FindPath(FrameThreadSafe, FPVector2, FPVector2, FP, in NavMeshRegionMask, PathQuality, long, NavMesh) More...
 
void SetNavMesh (NavMesh navmesh)
 Bind a navmesh to a pathfinder. More...
 

Public Attributes

PathVertex[] Path => _funnel
 THe funneled path. More...
 
Int32 PathSize => _funneledPathSize
 The funneled path size. More...
 
PathVertex[] RawPath => _rawPath
 The un-funneled raw path. More...
 
Int32 RawPathSize => _rawPathSize
 The size of the RawPath. More...
 

Additional Inherited Members

- Properties inherited from Quantum.Navigation.IPathFinderData
PathVertex[] Path [get]
 The path. More...
 
Int32 PathSize [get]
 The path size. More...
 
PathVertex[] RawPath [get]
 The raw, unfunneled path More...
 
Int32 RawPathSize [get]
 The raw path size. More...
 

Detailed Description

Navmesh TA* pathfinder class.

Constructor & Destructor Documentation

◆ PathFinder() [1/2]

Quantum.Navigation.PathFinder.PathFinder ( Int32  openNodesSize,
Int32  rawPathSize = 256,
RawPathAllocationStrategy  rawPathAllocationStrategy = RawPathAllocationStrategy.Fixed 
)
inline

Create a pathfinder object.

Parameters
openNodesSizeThe maximum number of open nodes the A* can work with (usually Navigation.Constants.PathFinderSize
rawPathSizeThe raw path size
rawPathAllocationStrategyFail path or allocate when above rawPathSize

◆ PathFinder() [2/2]

Quantum.Navigation.PathFinder.PathFinder ( NavMesh  navmesh,
Int32  rawPathSize = 256,
RawPathAllocationStrategy  rawPathAllocationStrategy = RawPathAllocationStrategy.Fixed 
)
inline

Create a pathfinder for a certain navmesh.

Uses the triangle count as pathfinder size.

Parameters
navmeshNavmesh object
rawPathSizeThe raw path size
rawPathAllocationStrategyFail path or allocate when above rawPathSize

Member Function Documentation

◆ SetNavMesh()

void Quantum.Navigation.PathFinder.SetNavMesh ( NavMesh  navmesh)
inline

Bind a navmesh to a pathfinder.

Parameters
navmeshNavmesh object

◆ Dispose()

void Quantum.Navigation.PathFinder.Dispose ( )
inline

Dispose the pathfinder object.

◆ FindPath() [1/2]

FindPathResult Quantum.Navigation.PathFinder.FindPath ( FrameThreadSafe  frame,
FPVector2  start,
FPVector2  end,
FP  automaticTargetCorrectionRadius,
in NavMeshRegionMask  regionMask,
PathQuality  quality = PathQuality.Good,
long  heuristicWeight = FP.RAW_ONE,
NavMesh  navmesh = null 
)
inline

Find path.

Parameters
frameThe frame object.
startStarting position
endTarget position
automaticTargetCorrectionRadiusThe range of cells used to validated the target position.
regionMaskRegion mask is used to check if navmesh parts are active or inactive
qualityThe path quality
navmeshThe navmesh to operate on
heuristicWeightThe weight of the heuristic function, default is one
Returns
The corrected end position

◆ FindPath() [2/2]

FindPathResult Quantum.Navigation.PathFinder.FindPath ( FrameThreadSafe  frame,
FPVector3  start,
FPVector3  end,
FP  automaticTargetCorrectionRadius,
in NavMeshRegionMask  regionMask,
PathQuality  quality = PathQuality.Good,
long  heuristicWeight = FP.RAW_ONE,
NavMesh  navmesh = null 
)
inline

Member Data Documentation

◆ RawPathSize

Int32 Quantum.Navigation.PathFinder.RawPathSize => _rawPathSize

The size of the RawPath.

◆ RawPath

PathVertex [] Quantum.Navigation.PathFinder.RawPath => _rawPath

The un-funneled raw path.

◆ PathSize

Int32 Quantum.Navigation.PathFinder.PathSize => _funneledPathSize

The funneled path size.

◆ Path

PathVertex [] Quantum.Navigation.PathFinder.Path => _funnel

THe funneled path.