Class PathNode
- java.lang.Object
-
- org.dreambot.api.methods.walking.pathfinding.impl.node.PathNode
-
-
Constructor Summary
Constructors Constructor Description PathNode(int x, int y, int z)Create a new node
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description intcompareTo(PathNode other)floatgetCost()Gets the movement cost of this node.intgetDepth()Gets the depth of search used for this node.floatgetHeuristic()Deprecated.GameObjectgetObject()PathNodegetOwner()Gets owner of this node.intgetX()Gets the X coordinate for this node.intgetY()Gets the Y coordinate for this node.intgetZ()voidsetCost(float cost)Sets the movement cost of this node.voidsetDepth(int depth)Sets the depth of search used for this node.voidsetHeuristic(float heuristic)Deprecated.intsetOwner(PathNode owner)Set the owner of this node.voidsetX(int x)Sets the X coordinate for this node.voidsetY(int y)Sets the Y coordinate for this node.voidsetZ(int z)java.lang.StringtoString()TiletoTile()Creates a global tile from current client global coordinates from node coordinatesTiletoTile(int baseX, int baseY)Creates a global tile from node coordinates.
-
-
-
Method Detail
-
compareTo
public int compareTo(PathNode other)
- Specified by:
compareToin interfacejava.lang.Comparable<PathNode>
-
getObject
public GameObject getObject()
-
getX
public int getX()
Gets the X coordinate for this node.- Returns:
- the X coordinate for this node as a int.
-
setX
public void setX(int x)
Sets the X coordinate for this node.- Parameters:
x- the X coordinate you wish to set.
-
getY
public int getY()
Gets the Y coordinate for this node.- Returns:
- the Y coordinate for this node as a int.
-
setY
public void setY(int y)
Sets the Y coordinate for this node.- Parameters:
y- the Y coordinate you wish to set.
-
getZ
public int getZ()
-
setZ
public void setZ(int z)
-
getDepth
public int getDepth()
Gets the depth of search used for this node.- Returns:
- the depth of search used for this node as a int.
-
setDepth
public void setDepth(int depth)
Sets the depth of search used for this node.- Parameters:
depth- the depth of search you wish to set.
-
getCost
public float getCost()
Gets the movement cost of this node.- Returns:
- the movement cost of this node as a float.
-
setCost
public void setCost(float cost)
Sets the movement cost of this node.- Parameters:
cost- the movement cost you wish to set.
-
getHeuristic
@Deprecated public float getHeuristic()
Deprecated.Gets heuristic value for this node.- Returns:
- the heuristic value of this node as a float.
-
setHeuristic
@Deprecated public void setHeuristic(float heuristic)
Deprecated.Sets heuristic value for this node.- Parameters:
heuristic- the heuristic value you wish to set.
-
getOwner
public PathNode getOwner()
Gets owner of this node.- Returns:
- the owner of this node as a PathNode.
-
setOwner
public int setOwner(PathNode owner)
Set the owner of this node.- Parameters:
owner- The owner of this node.- Returns:
- The depth of search.
-
toTile
public Tile toTile()
Creates a global tile from current client global coordinates from node coordinates- Returns:
- a global tile created from node coordinates
-
toTile
public Tile toTile(int baseX, int baseY)
Creates a global tile from node coordinates.- Parameters:
baseX- The base X coordinates you would like to create tile from.baseY- The base Y coordinates you would like to create tile from.- Returns:
- a global tile created from the node coordinates.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
-