com.threerings.media.util
Class AStarPathUtil.Stepper

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

public static class AStarPathUtil.Stepper
extends Object

Considers all the possible steps the piece in question can take.


Field Summary
protected  boolean _considerDiagonals
           
protected  AStarPathUtil.Info _info
           
protected  AStarPathUtil.Node _node
           
 
Constructor Summary
AStarPathUtil.Stepper()
           
AStarPathUtil.Stepper(boolean considerDiagonals)
           
 
Method Summary
protected  void considerStep(int x, int y, int cost)
           
 void considerSteps(int x, int y)
          Should call considerStep(int, int, int) in turn on all possible steps from the specified coordinates.
 void init(AStarPathUtil.Info info, AStarPathUtil.Node n)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_considerDiagonals

protected boolean _considerDiagonals

_info

protected AStarPathUtil.Info _info

_node

protected AStarPathUtil.Node _node
Constructor Detail

AStarPathUtil.Stepper

public AStarPathUtil.Stepper()

AStarPathUtil.Stepper

public AStarPathUtil.Stepper(boolean considerDiagonals)
Method Detail

init

public void init(AStarPathUtil.Info info,
                 AStarPathUtil.Node n)

considerSteps

public void considerSteps(int x,
                          int y)
Should call considerStep(int, int, int) in turn on all possible steps from the specified coordinates. No checking must be done as to whether the step is legal, that will be handled later. Just enumerate all possible steps.


considerStep

protected void considerStep(int x,
                            int y,
                            int cost)