|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.path.Path
public class Path
This class represents a path. A path is a number of coordinates that get travelled sequencially.
Constructor Summary | |
---|---|
Path()
Creates a new empty path. |
|
Path(java.lang.String file)
Creates a path object from a file that contains stored path data. |
Method Summary | |
---|---|
void |
addPoint(float x,
float z)
Adds a point to the path. |
void |
draw(javax.media.opengl.GL gl)
This method can be used to visualize the path by connected lines from the start point to the destination point. |
Point3D |
getCurrentPoint()
Returns the current point of the path. |
Point3D |
getNextPoint()
Returns the next point in the path. |
java.util.LinkedList<Point3D> |
getPoints()
Returns the list of points of the path. |
Point3D |
getPreviousPoint()
Returns the point previous to the current one of the path if there exits one, otherwise null is returned. |
void |
next()
Sets the next point of the path as the active one |
void |
reset()
Resets the path to it's first point. |
void |
save(java.lang.String pathToFile)
Saves the path to a file with the specified file path. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Path()
public Path(java.lang.String file)
file
- path to file with stored path data.Method Detail |
---|
public void addPoint(float x, float z)
x
- x coordinatez
- z coordinatepublic Point3D getCurrentPoint()
public Point3D getNextPoint()
public Point3D getPreviousPoint()
public java.util.LinkedList<Point3D> getPoints()
public void next()
public void reset()
public void draw(javax.media.opengl.GL gl)
gl
- public void save(java.lang.String pathToFile)
pathToFile
- path to the file into which the path data gets
saved
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |