com.brackeen.javagamebook.path
Class AStarSearchWithBSP.LeafNode

java.lang.Object
  extended bycom.brackeen.javagamebook.path.AStarNode
      extended bycom.brackeen.javagamebook.path.AStarSearchWithBSP.LeafNode
All Implemented Interfaces:
java.lang.Comparable
Enclosing class:
AStarSearchWithBSP

public static class AStarSearchWithBSP.LeafNode
extends AStarNode

The LeafNode class is an AStarNode that repesents a location in a leaf of a BSP tree. Used for the start and goal nodes of a search.


Constructor Summary
AStarSearchWithBSP.LeafNode(BSPTree.Leaf leaf, Vector3D location)
           
 
Method Summary
 float getCost(AStarNode node)
          Gets the cost between this node and the specified adjacent (aka "neighbor" or "child") node.
 float getEstimatedCost(AStarNode node)
          Gets the estimated cost between this node and the specified node.
 java.util.List getNeighbors()
          Gets the children (aka "neighbors" or "adjacent nodes") of this node.
 
Methods inherited from class com.brackeen.javagamebook.path.AStarNode
compareTo, getCost
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AStarSearchWithBSP.LeafNode

public AStarSearchWithBSP.LeafNode(BSPTree.Leaf leaf,
                                   Vector3D location)
Method Detail

getCost

public float getCost(AStarNode node)
Description copied from class: AStarNode
Gets the cost between this node and the specified adjacent (aka "neighbor" or "child") node.

Specified by:
getCost in class AStarNode

getEstimatedCost

public float getEstimatedCost(AStarNode node)
Description copied from class: AStarNode
Gets the estimated cost between this node and the specified node. The estimated cost should never exceed the true cost. The better the estimate, the more effecient the search.

Specified by:
getEstimatedCost in class AStarNode

getNeighbors

public java.util.List getNeighbors()
Description copied from class: AStarNode
Gets the children (aka "neighbors" or "adjacent nodes") of this node.

Specified by:
getNeighbors in class AStarNode