com.croftsoft.core.ai.astar
Class GridCartographer

java.lang.Object
  extended by com.croftsoft.core.ai.astar.GridCartographer
All Implemented Interfaces:
Cartographer

public final class GridCartographer
extends Object
implements Cartographer

Grid cartographer for continuous space. The nodes are spaced equally apart in the 8 cardinal directions.

Since:
2003-04-21
Version:
2003-05-10
Author:
David Wallace Croft

Field Summary
static double DEFAULT_STEP_SIZE
           
 
Constructor Summary
GridCartographer(SpaceTester spaceTester)
           
GridCartographer(SpaceTester spaceTester, double stepSize)
           
 
Method Summary
 double estimateCostToGoal(Object node)
           
 Iterator getAdjacentNodes(Object node)
           
 double getCostToAdjacentNode(Object fromNode, Object toNode)
           
 boolean isGoalNode(Object node)
           
 void setGoalPointXY(PointXY goalPointXY)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_STEP_SIZE

public static final double DEFAULT_STEP_SIZE
See Also:
Constant Field Values
Constructor Detail

GridCartographer

public GridCartographer(SpaceTester spaceTester,
                        double stepSize)

GridCartographer

public GridCartographer(SpaceTester spaceTester)
Method Detail

setGoalPointXY

public void setGoalPointXY(PointXY goalPointXY)

estimateCostToGoal

public double estimateCostToGoal(Object node)
Specified by:
estimateCostToGoal in interface Cartographer

getAdjacentNodes

public Iterator getAdjacentNodes(Object node)
Specified by:
getAdjacentNodes in interface Cartographer

getCostToAdjacentNode

public double getCostToAdjacentNode(Object fromNode,
                                    Object toNode)
Specified by:
getCostToAdjacentNode in interface Cartographer

isGoalNode

public boolean isGoalNode(Object node)
Specified by:
isGoalNode in interface Cartographer

CroftSoft Javadoc

CroftSoft Core Javadoc (2008-09-28 20:58:02)