A* Pathfinding Project  4.1.14
The A* Pathfinding Project for Unity 3D
BlockManager.TraversalProvider Class Reference

Blocks nodes according to a BlockManager. More...

Detailed Description

Blocks nodes according to a BlockManager.

Public Member Functions

 TraversalProvider (BlockManager blockManager, BlockMode mode, List< SingleNodeBlocker > selector)
 
bool CanTraverse (Path path, GraphNode node)
 
uint GetTraversalCost (Path path, GraphNode node)
 

Properties

BlockMode mode [get, private set]
 Affects which nodes are considered blocked. More...
 

Private Attributes

readonly BlockManager blockManager
 Holds information about which nodes are occupied. More...
 
readonly List< SingleNodeBlockerselector
 Blockers for this path. More...
 

Constructor & Destructor Documentation

◆ TraversalProvider()

TraversalProvider ( BlockManager  blockManager,
BlockMode  mode,
List< SingleNodeBlocker selector 
)

Member Function Documentation

◆ CanTraverse()

bool CanTraverse ( Path  path,
GraphNode  node 
)

Implements ITraversalProvider.

◆ GetTraversalCost()

uint GetTraversalCost ( Path  path,
GraphNode  node 
)

Implements ITraversalProvider.

Member Data Documentation

◆ blockManager

readonly BlockManager blockManager
private

Holds information about which nodes are occupied.

◆ selector

readonly List<SingleNodeBlocker> selector
private

Blockers for this path.

The effect depends on mode.

Note that having a large selector has a performance cost.

See also
mode

Property Documentation

◆ mode

BlockMode mode
getprivate set

Affects which nodes are considered blocked.


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