|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectframs_client_3d.Vector3D
Three dimensional vectors class.
Field Summary | |
private float[] |
v
|
Constructor Summary | |
Vector3D(float[] vector)
Defualt parametrized constructor. |
|
Vector3D(float vx,
float vy,
float vz)
Default parametrized constructor. |
|
Vector3D(Vector3D vector)
Copy constructor. |
Method Summary | |
float[] |
getVector()
Vector3D getter. |
float |
length()
Calculates the length of the vector. |
void |
mult(float scalar)
Multiply the vector by a scalar. |
void |
normalize()
Normalize a vector. |
void |
rotate(float angle,
Vector3D axis)
Rotates the vector around an axis about an angle. |
float |
scalarProduct(Vector3D vector)
Calculates the dot product with given vector. |
void |
vectorProduct(Vector3D vector)
Calculates the cross product of two vectors. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private float[] v
Constructor Detail |
public Vector3D(float vx, float vy, float vz)
vx
- vector x coordinatevy
- vector y coordinatevz
- vector z coordinatepublic Vector3D(float[] vector)
vector
- an array of vector coordinatespublic Vector3D(Vector3D vector)
vector
- 3D vector objectMethod Detail |
public float[] getVector()
public void rotate(float angle, Vector3D axis)
angle
- a rotation angleaxis
- a rotation axis vectorpublic void vectorProduct(Vector3D vector)
vector
-
public void normalize()
public float length()
public float scalarProduct(Vector3D vector)
vector
-
public void mult(float scalar)
scalar
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |