|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectmr3d.lang.Point3D
The class Point3D is able to represent a 3D point in a virtual world. It is a composite object containing different vectors (Vector3D).
Vector3D| Field Summary | |
private Vector3D |
base
Base Vector. |
Vector3D |
cameraCoords
Camera Coordinates Vector. |
Vector3D |
coords
Coordinates Vector. |
private int |
OAI
Object Array Index of the object the point belongs to. |
int |
x2d
2D-representation of the 3D-point. |
int |
y2d
2D-representation of the 3D-point. |
| Fields inherited from interface mr3d.debug.Debugable |
ERROR_INT, ERROR_STRING |
| Constructor Summary | |
Point3D()
Constructs an 3D point with all initial values for all coordinates equal 0. |
|
Point3D(int x,
int y,
int z)
Constructs an 3D point from the parameters x, y and z, which represent the x, y and z coordinates of the point. |
|
Point3D(Vector3D coordVec)
Constructs an 3D point from a 3D Vector, which contains representations of the x, y and z coordinates of the point. |
|
| Method Summary | |
boolean |
equals(Point3D comparePoint)
Comapes two 3D points. |
Vector3D |
getBase()
Returns a copy of the base vector, which contains the original data of the 3D point. |
int |
getOAI()
Returns the Object Array Index of the object the point belongs to. |
void |
registerOAI(int value)
Registers the Object Array Index of the object the point belongs to. |
void |
reset()
Overrides the coordinate vector coords with
the base vector base. |
void |
resetBase(int x,
int y,
int z)
Resets the initial value of this 3D point. |
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. |
void |
transform(Matrix transMat)
Performs a transformaton with the point. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private Vector3D base
public Vector3D cameraCoords
public Vector3D coords
private int OAI
public int x2d
public int y2d
| Constructor Detail |
public Point3D()
public Point3D(int x,
int y,
int z)
x - x-coordinate of the 3D pointy - y-coordinate of the 3D pointz - z-coordinate of the 3D pointpublic Point3D(Vector3D coordVec)
coordVec - vector containing the coordinates of the
3D point| Method Detail |
public boolean equals(Point3D comparePoint)
comparePoint - point to which this vector will be compared
public Vector3D getBase()
public int getOAI()
public void registerOAI(int value)
public void reset()
coords with
the base vector base.
public void resetBase(int x,
int y,
int z)
base and coords will be
overwritten with the specified values.
x - x-coordinate of the 3D pointy - y-coordinate of the 3D pointz - z-coordinate of the 3D pointpublic void toConsole()
Debugable
toConsole in interface Debugablepublic void toConsole(java.lang.String msgString)
Debugable
toConsole in interface Debugablepublic void transform(Matrix transMat)
coords
with the specified matrix.
- Specified by:
transform in interface Transformable
- Parameters:
transMat - transformation matrix
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||