zombie.ai.astar
Class AStarPathMap.Node

java.lang.Object
  extended by zombie.ai.astar.AStarPathMap.Node
All Implemented Interfaces:
java.lang.Comparable, INode
Enclosing class:
AStarPathMap

public static class AStarPathMap.Node
extends java.lang.Object
implements java.lang.Comparable, INode

A single node in the search graph


Field Summary
 java.lang.Integer ID
           
 SearchData[] searchData
           
 short x
          The x coordinate of the node
 short y
          The y coordinate of the node
 short z
          The z coordinate of the node
 
Constructor Summary
AStarPathMap.Node()
           
AStarPathMap.Node(short x, short y, short z)
          Create a new node
 
Method Summary
 int compareTo(java.lang.Object other)
           
 java.lang.Integer getID()
           
 SearchData getSearchData(int thread)
           
 int setParent(int thread, int id, AStarPathMap.Node parent)
          Set the parent of this node
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

x

public short x
The x coordinate of the node


y

public short y
The y coordinate of the node


z

public short z
The z coordinate of the node


searchData

public SearchData[] searchData

ID

public java.lang.Integer ID
Constructor Detail

AStarPathMap.Node

public AStarPathMap.Node()

AStarPathMap.Node

public AStarPathMap.Node(short x,
                         short y,
                         short z)
Create a new node

Parameters:
x - The x coordinate of the node
y - The y coordinate of the node
Method Detail

getID

public java.lang.Integer getID()
Specified by:
getID in interface INode

compareTo

public int compareTo(java.lang.Object other)
Specified by:
compareTo in interface java.lang.Comparable
Specified by:
compareTo in interface INode
See Also:
Comparable.compareTo(Object)

setParent

public int setParent(int thread,
                     int id,
                     AStarPathMap.Node parent)
Set the parent of this node

Specified by:
setParent in interface INode
Parameters:
parent - The parent node which lead us to this node
Returns:
The depth we have no reached in searching

getSearchData

public SearchData getSearchData(int thread)
Specified by:
getSearchData in interface INode