| Package | be.dauntless.astar.basic3d |
| Class | public class Map3D |
| Inheritance | Map3D Object |
| Implements | IMap |
| Subclasses | GravityMap3D |
| Property | Defined By | ||
|---|---|---|---|
| standardCost : Number
Gets the standard cost for this map
| Map3D | ||
| Method | Defined By | ||
|---|---|---|---|
Map3D(width:int, length:int, height:int, defaultCost:int = 1)
Creates a new Map object with the specified width en height
| Map3D | ||
Returns the distance multiplier for the given two tiles. | Map3D | ||
| Map3D | |||
Returns a list with the neighbours of the given tile. | Map3D | ||
getTileAt(position:Point):IPositionTile
Returns the IPositionTile at the given location
| Map3D | ||
setTile(tile:IPositionTile):void
Sets the given tile at the given location
| Map3D | ||
| Method | Defined By | ||
|---|---|---|---|
isValidPosition(position:Point):Boolean
Returns whether or not the given position is located within the map
| Map3D | ||
| standardCost | property |
standardCost:NumberGets the standard cost for this map
public function get standardCost():Number public function set standardCost(value:Number):void| Map3D | () | Constructor |
public function Map3D(width:int, length:int, height:int, defaultCost:int = 1)Creates a new Map object with the specified width en height
Parameterswidth:int — The width of the map
| |
length:int — The height of the map
| |
height:int | |
defaultCost:int (default = 1) |
| getDistance | () | method |
public function getDistance(f:IAstarTile, t:IAstarTile):NumberReturns the distance multiplier for the given two tiles. It can return the following: SQRT(2) - If the tiles have only one axis in common SQRT(3) - If the tiles have no axis in common 1 - If the tiles have two axis in common
Parameters
f:IAstarTile — The first point
| |
t:IAstarTile — The second point
|
Number — The multiplier to be used for setting the correct cost to go from the first tile to the second
|
| getHeuristic | () | method |
public function getHeuristic(tile:IAstarTile, req:PathRequest):NumberParameters
tile:IAstarTile | |
req:PathRequest |
Number |
| getNeighbours | () | method |
public function getNeighbours(tile:IAstarTile):Vector.<IAstarTile>Returns a list with the neighbours of the given tile.
Parameters
tile:IAstarTile — The position of the tile to get the neighbours of
|
Vector.<IAstarTile> — A list containing all the neighbouring tiles
|
| getTileAt | () | method |
public function getTileAt(position:Point):IPositionTileReturns the IPositionTile at the given location
Parameters
position:Point — The point specifing the location for the tile
|
IPositionTile — IPositionTile at the given location
|
| isValidPosition | () | method |
protected function isValidPosition(position:Point):BooleanReturns whether or not the given position is located within the map
Parameters
position:Point — The position to check
|
Boolean — A boolean indicating if the given position is located within the map
|
| setTile | () | method |
public function setTile(tile:IPositionTile):voidSets the given tile at the given location
Parameters
tile:IPositionTile — The tile to place in the map
|