|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.debug.ErrorHandling
mr3d.PointArrayTable
The point array table manages the 3D-points of a 3D-scene. It is a collection of 3D-points. It also is an administrative object that ensures that 3D-points are only stored once and it gives all classes an interface to access the points.
PointArrayTable is a Singleton.
| Field Summary | |
private static PointArrayTable |
instance
Reference to the only instance of the class. |
private static int |
nrOfInstances
Stores the number of instances of ObjectArray. |
private java.util.Vector |
points
vector containing all 3D-points of the scene |
| Fields inherited from class mr3d.debug.ErrorHandling |
|
| Fields inherited from interface mr3d.debug.Debugable |
ERROR_INT, ERROR_STRING |
| Constructor Summary | |
private |
PointArrayTable()
Creates a new PointArrayTable. |
| Method Summary | |
void |
addPoint(Point3D newPoint)
Adds a 3D-point to the point vector. |
void |
clearPoints()
Clears out the point array table. |
static PointArrayTable |
createInstance()
Creates one instance of the PointArrayTable.
|
Point3D |
getPoint(int index)
Returns the 3D-point at the specified index |
int |
size()
Returns the number of points in the point array table. |
void |
toConsole()
Prints the contents of the object to the Java console. |
void |
toConsole(java.lang.String msgString)
Prints the contents of the object to the Java console together with an information string. |
| Methods inherited from class mr3d.debug.ErrorHandling |
getErrMsg, notifyError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private static PointArrayTable instance
private static int nrOfInstances
private java.util.Vector points
| Constructor Detail |
private PointArrayTable()
PointArrayTable. The constructor is
private for PointArrayTable is a Singleton.
| Method Detail |
public void addPoint(Point3D newPoint)
newPoint - point to be addedpublic void clearPoints()
public static PointArrayTable createInstance()
PointArrayTable.
This method checks the nrOfInstances value to ensure only one
instance is running. If nrOfIntances is greater then 0 the
instance referenced in instance is returned.
public Point3D getPoint(int index)
index - point array index of the pointpublic int size()
public void toConsole()
Debugable
toConsole in interface Debugablepublic void toConsole(java.lang.String msgString)
Debugable
toConsole in interface Debugable
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||