|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.mazewar.Point
net.mazewar.DirectedPoint
public class DirectedPoint
An integral representation of a point in two dimensional space, with direction. Sort of like a vector, but zero magnitude.
Constructor Summary | |
---|---|
DirectedPoint(DirectedPoint dp)
Create a DirectedPoint from another DirectedPoint . |
|
DirectedPoint(int x,
int y,
Direction direction)
Create a DirectedPoint from coordinates and a Direction . |
|
DirectedPoint(Point point,
Direction direction)
Create a DirectedPoint from a Point and a Direction . |
Method Summary | |
---|---|
Direction |
getDirection()
Obtain the Direction of this DirectedPoint . |
Point |
getPoint()
|
Methods inherited from class net.mazewar.Point |
---|
getX, getY |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DirectedPoint(int x, int y, Direction direction)
DirectedPoint
from coordinates and a Direction
.
x
- X-coordinate of this DirectedPoint
.y
- Y-coordinate of this DirectedPoint
.direction
- The Direction
of this DirectedPoint
.public DirectedPoint(Point point, Direction direction)
DirectedPoint
from a Point
and a Direction
.
point
- Location of this DirectedPoint
.direction
- The Direction
of this DirectedPoint
.public DirectedPoint(DirectedPoint dp)
DirectedPoint
from another DirectedPoint
.
dp
- The DirectedPoint
to copy from.Method Detail |
---|
public Direction getDirection()
Direction
of this DirectedPoint
.
DirectedPoint
's Cardinal Direction
.public Point getPoint()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |