com.threerings.media.util
Class AStarPathUtil.Info

java.lang.Object
  extended by com.threerings.media.util.AStarPathUtil.Info
Enclosing class:
AStarPathUtil

protected static class AStarPathUtil.Info
extends Object

A holding class to contain the wealth of information referenced while performing an A* search for a path through a tile array.


Field Summary
protected  HashIntMap<AStarPathUtil.Node> _nodes
          The nodes being considered in the path.
 int destx
          The destination coordinates in the tile array.
 int desty
          The destination coordinates in the tile array.
 int maxcost
          The maximum cost of any path that we'll consider.
 SortedSet<AStarPathUtil.Node> open
          The set of open nodes being searched.
 int tilehei
          The tile array dimensions.
 int tilewid
          The tile array dimensions.
 AStarPathUtil.TraversalPred tpred
          Knows whether or not tiles are traversable.
 Object trav
          The traverser moving along the path.
 
Constructor Summary
AStarPathUtil.Info(AStarPathUtil.TraversalPred tpred, Object trav, int longest, int destx, int desty)
           
 
Method Summary
 AStarPathUtil.Node getNode(int x, int y)
          Get or create the node for the specified point.
protected  boolean isStepValid(int sx, int sy, int dx, int dy)
          Returns whether moving from the given source to destination coordinates is a valid move.
protected  boolean isTraversable(int x, int y)
          Returns whether the given coordinate is valid and traversable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tpred

public AStarPathUtil.TraversalPred tpred
Knows whether or not tiles are traversable.


tilewid

public int tilewid
The tile array dimensions.


tilehei

public int tilehei
The tile array dimensions.


trav

public Object trav
The traverser moving along the path.


open

public SortedSet<AStarPathUtil.Node> open
The set of open nodes being searched.


destx

public int destx
The destination coordinates in the tile array.


desty

public int desty
The destination coordinates in the tile array.


maxcost

public int maxcost
The maximum cost of any path that we'll consider.


_nodes

protected HashIntMap<AStarPathUtil.Node> _nodes
The nodes being considered in the path.

Constructor Detail

AStarPathUtil.Info

public AStarPathUtil.Info(AStarPathUtil.TraversalPred tpred,
                          Object trav,
                          int longest,
                          int destx,
                          int desty)
Method Detail

isStepValid

protected boolean isStepValid(int sx,
                              int sy,
                              int dx,
                              int dy)
Returns whether moving from the given source to destination coordinates is a valid move.


isTraversable

protected boolean isTraversable(int x,
                                int y)
Returns whether the given coordinate is valid and traversable.


getNode

public AStarPathUtil.Node getNode(int x,
                                  int y)
Get or create the node for the specified point.