|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.vodafone.v10.graphics.j3d.Vector3D
3D vector class. Values for X, Y and Z are valid within the range from -32768 to 32767.
Field Summary | |
int |
x
The x component |
int |
y
The y component |
int |
z
The z component |
Constructor Summary | |
Vector3D()
Vector3D constructor |
|
Vector3D(int x,
int y,
int z)
Vector3D constructor |
Method Summary | |
int |
getX()
Gets the x component. |
int |
getY()
Gets the y component. |
int |
getZ()
Gets the z component. |
int |
innerProduct(Vector3D v)
Calculates inner product. |
static int |
innerProduct(Vector3D v1,
Vector3D v2)
Calculates the inner product of two vectors. |
void |
outerProduct(Vector3D v)
Calculates outer product. |
static Vector3D |
outerProduct(Vector3D v1,
Vector3D v2)
Calculates the outer product of two vectors. |
void |
set(int x,
int y,
int z)
Sets a new vector. |
void |
setX(int x)
Sets a new x component. |
void |
setY(int y)
Sets a new y component. |
void |
setZ(int z)
Sets a new z component. |
void |
unit()
Performs normalization. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public int x
public int y
public int z
Constructor Detail |
public Vector3D()
public Vector3D(int x, int y, int z)
x
- X componenty
- Y componentz
- Z componentMethod Detail |
public int getX()
public int getY()
public int getZ()
public void setX(int x)
x
- The new x componentpublic void setY(int y)
y
- The new y componentpublic void setZ(int z)
z
- The new z componentpublic void set(int x, int y, int z)
x
- The new x componenty
- The new y componentz
- The new z componentpublic void unit()
IllegalArgumentException
- if a zero vector.IllegalStateException
- if called during sprite execution.public int innerProduct(Vector3D v)
v
- The vector on which the operation is performedIllegalStateException
- if called during sprite execution.public void outerProduct(Vector3D v)
v
- The vector on which the operation is performedIllegalStateException
- if called during sprite execution.public static int innerProduct(Vector3D v1, Vector3D v2)
v1
- One of the vectorsv2
- The other vectorIllegalStateException
- if called during sprite execution.public static Vector3D outerProduct(Vector3D v1, Vector3D v2)
v1
- One of the vectorsv2
- The other vectorIllegalStateException
- if called during sprite execution.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |