Photon Quantum 3.0.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 (Native.Allocator allocator, Int32 openNodesSize, Int32 rawPathSize=256, RawPathAllocationStrategy rawPathAllocationStrategy=RawPathAllocationStrategy.Fixed)
 Create a pathfinder object. More...
 
 PathFinder (Native.Allocator allocator, 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, bool automaticTargetCorrection, FP automaticTargetCorrectionRadius, NavMeshRegionMask regionMask, PathQuality quality=PathQuality.Good, NavMesh navmesh=null)
 Find path. More...
 
FindPathResult FindPath (FrameThreadSafe frame, FPVector3 start, FPVector3 end, bool automaticTargetCorrection, FP automaticTargetCorrectionRadius, NavMeshRegionMask regionMask, PathQuality quality=PathQuality.Good, NavMesh navmesh=null)
 See FindPath(FrameThreadSafe, FPVector2, FPVector2, bool, FP, NavMeshRegionMask, PathQuality, 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 ( Native.Allocator  allocator,
Int32  openNodesSize,
Int32  rawPathSize = 256,
RawPathAllocationStrategy  rawPathAllocationStrategy = RawPathAllocationStrategy.Fixed 
)
inline

Create a pathfinder object.

Parameters
allocatorAllocator
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 ( Native.Allocator  allocator,
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
allocatorAllocator
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,
bool  automaticTargetCorrection,
FP  automaticTargetCorrectionRadius,
NavMeshRegionMask  regionMask,
PathQuality  quality = PathQuality.Good,
NavMesh  navmesh = null 
)
inline

Find path.

Parameters
frameThe frame object.
startStarting position
endTarget position
automaticTargetCorrectionIf the target is outside the navmesh the position will be tried to be corrected.
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
Returns
The corrected end position

◆ FindPath() [2/2]

FindPathResult Quantum.Navigation.PathFinder.FindPath ( FrameThreadSafe  frame,
FPVector3  start,
FPVector3  end,
bool  automaticTargetCorrection,
FP  automaticTargetCorrectionRadius,
NavMeshRegionMask  regionMask,
PathQuality  quality = PathQuality.Good,
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.