org.newdawn.slick.util.pathfinding.navmesh
Class NavPath

java.lang.Object
  extended by org.newdawn.slick.util.pathfinding.navmesh.NavPath

public class NavPath
extends java.lang.Object

A path across a navigation mesh

Author:
kevin

Constructor Summary
NavPath()
          Create a new path
 
Method Summary
 float getX(int step)
          Get the x coordinate of the given step
 float getY(int step)
          Get the y coordinate of the given step
 int length()
          Get the length of the path
 void push(Link link)
          Push a link to the end of the path
 void remove(int i)
          Remove a step in the path
 java.lang.String toString()
          Get a string representation of this instance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

NavPath

public NavPath()
Create a new path

Method Detail

push

public void push(Link link)
Push a link to the end of the path

Parameters:
link - The link to the end of the path

length

public int length()
Get the length of the path

Returns:
The number of steps in the path

getX

public float getX(int step)
Get the x coordinate of the given step

Parameters:
step - The index of the step to retrieve
Returns:
The x coordinate at the given step index

getY

public float getY(int step)
Get the y coordinate of the given step

Parameters:
step - The index of the step to retrieve
Returns:
The y coordinate at the given step index

toString

public java.lang.String toString()
Get a string representation of this instance

Overrides:
toString in class java.lang.Object
Returns:
The string representation of this instance

remove

public void remove(int i)
Remove a step in the path

Parameters:
i -


Copyright © 2006 New Dawn Software. All Rights Reserved.