|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--Space
Space maintains a collection of Points, and a current view point. The points in space can be ordered by their distance from the current view point.
Constructor Summary | |
Space()
|
Method Summary | |
void |
addPoint(Point p)
Add Point p to this space. |
Point |
get(int i)
Get the point at position i in the collection ordered by the current view point. |
void |
order()
Sort the points in order of distance from the viewpoint. |
void |
printPoints(java.io.PrintStream ps)
Print the list of points. |
java.util.Vector |
samePlane(int k)
Print the list of points that are in the same kth plane as point p. |
void |
setView(int x,
int y,
int z)
Create 3d viewpoint. |
void |
setView(Point p)
Set the view point to be p. |
java.lang.String |
toString()
Create a string represenation of the object where the collection is given in order of a point's distance from the view point. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public Space()
Method Detail |
public void setView(int x, int y, int z)
x
- y
- z
- public void setView(Point p)
p
- The new view point.public Point get(int i)
i
- The position of the point to retrieve.
public java.lang.String toString()
toString
in class java.lang.Object
public java.util.Vector samePlane(int k)
k
- The index of the plane to report on.public void addPoint(Point p)
p
- The point to add.public void order()
public void printPoints(java.io.PrintStream ps) throws java.io.IOException
ps
- The PrintStream to print to.
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |