C# Class HPASharp.HierarchicalMap

Abstract maps represent, as the name implies, an abstraction built over the concrete map.
Inheritance: IMap
ファイルを表示 Open project: Rydra/HierarchicalPathfinder Class Usage Examples

Public Methods

Method Description
AddEdge ( int sourceNodeId, int destNodeId, int cost, int level = 1, bool inter = false ) : void
BelongToSameCluster ( int node1Id, int node2Id, int level ) : bool
FindClusterForPosition ( Position pos ) : Cluster
GetCluster ( int id ) : Cluster
GetCurrentClusterRectangle ( ) : Rectangle
GetHeuristic ( int startNodeId, int targetNodeId ) : int
GetNeighbours ( int nodeId ) : IEnumerable

Gets the neighbours(successors) of the nodeId for the level set in the currentLevel

GetNodeEdges ( int nodeId ) : AbsTilingEdgeInfo>.Edge>.List
GetOffset ( int level ) : int
HierarchicalMap ( ConcreteMap concreteMap, int clusterSize, int maxLevel ) : System
PositionInCurrentCluster ( Position position ) : bool
SetCurrentCluster ( Position pos, int level ) : void

Defines the bounding box of the cluster we want to process based on a given level and a position in the grid

SetCurrentCluster ( int x, int y, int offset ) : void

Defines the bounding box of the cluster we want to process

SetCurrentLevel ( int level ) : void
SetType ( TileType tileType ) : void

Method Details

AddEdge() public method

public AddEdge ( int sourceNodeId, int destNodeId, int cost, int level = 1, bool inter = false ) : void
sourceNodeId int
destNodeId int
cost int
level int
inter bool
return void

BelongToSameCluster() public method

public BelongToSameCluster ( int node1Id, int node2Id, int level ) : bool
node1Id int
node2Id int
level int
return bool

FindClusterForPosition() public method

public FindClusterForPosition ( Position pos ) : Cluster
pos Position
return Cluster

GetCluster() public method

public GetCluster ( int id ) : Cluster
id int
return Cluster

GetCurrentClusterRectangle() public method

public GetCurrentClusterRectangle ( ) : Rectangle
return HPASharp.Infrastructure.Rectangle

GetHeuristic() public method

public GetHeuristic ( int startNodeId, int targetNodeId ) : int
startNodeId int
targetNodeId int
return int

GetNeighbours() public method

Gets the neighbours(successors) of the nodeId for the level set in the currentLevel
public GetNeighbours ( int nodeId ) : IEnumerable
nodeId int
return IEnumerable

GetNodeEdges() public method

public GetNodeEdges ( int nodeId ) : AbsTilingEdgeInfo>.Edge>.List
nodeId int
return AbsTilingEdgeInfo>.Edge>.List

GetOffset() public method

public GetOffset ( int level ) : int
level int
return int

HierarchicalMap() public method

public HierarchicalMap ( ConcreteMap concreteMap, int clusterSize, int maxLevel ) : System
concreteMap ConcreteMap
clusterSize int
maxLevel int
return System

PositionInCurrentCluster() public method

public PositionInCurrentCluster ( Position position ) : bool
position Position
return bool

SetCurrentCluster() public method

Defines the bounding box of the cluster we want to process based on a given level and a position in the grid
public SetCurrentCluster ( Position pos, int level ) : void
pos Position
level int
return void

SetCurrentCluster() public method

Defines the bounding box of the cluster we want to process
public SetCurrentCluster ( int x, int y, int offset ) : void
x int
y int
offset int
return void

SetCurrentLevel() public method

public SetCurrentLevel ( int level ) : void
level int
return void

SetType() public method

public SetType ( TileType tileType ) : void
tileType TileType
return void