Packagebe.dauntless.astar.basic3d
Classpublic class GravityMap3D
InheritanceGravityMap3D Inheritance Map3D Inheritance Object

A simple Map implementation for the IMap interface



Public Properties
 PropertyDefined By
 InheritedstandardCost : Number
Gets the standard cost for this map
Map3D
Public Methods
 MethodDefined By
  
GravityMap3D(width:int, length:int, height:int)
Creates a new GravityMap object with the specified width en height
GravityMap3D
  
[override] Returns the distance multiplier for the given two tiles.
GravityMap3D
 Inherited
Map3D
  
[override] Returns a list with the neighbours of the given tile.
GravityMap3D
 Inherited
getTileAt(position:Point):IPositionTile
Returns the IPositionTile at the given location
Map3D
  
getTilesInColumn(p:Point):Vector.<IAstarTile>
Returns a list of IPositionTiles at the given (x,y) location.
GravityMap3D
 Inherited
Sets the given tile at the given location
Map3D
Protected Methods
 MethodDefined By
 Inherited
isValidPosition(position:Point):Boolean
Returns whether or not the given position is located within the map
Map3D
Constructor Detail
GravityMap3D()Constructor
public function GravityMap3D(width:int, length:int, height:int)

Creates a new GravityMap object with the specified width en height

Parameters
width:int — The width of the map
 
length:int — The height of the map
 
height:int
Method Detail
getDistance()method
override public function getDistance(f:IAstarTile, t:IAstarTile):Number

Returns the distance multiplier for the given two tiles. For a this 3D Map, the Eucledean distance is used

Parameters

f:IAstarTile — The first point
 
t:IAstarTile — The second point

Returns
Number — The multiplier to be used for setting the correct cost to go from the first tile to the second
getNeighbours()method 
override 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

Returns
Vector.<IAstarTile> — A list containing all the neighbouring tiles
getTilesInColumn()method 
public function getTilesInColumn(p:Point):Vector.<IAstarTile>

Returns a list of IPositionTiles at the given (x,y) location. All the tiles in the specified column are returned

Parameters

p:Point

Returns
Vector.<IAstarTile> — A vector list concisting of all the IAstarTiles in the given column