|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--md3.util.Vec3
The Vec3 class represents a 3-tuple of floats: (float, float, float).
Field Summary | |
float |
x
|
float |
y
|
float |
z
|
Constructor Summary | |
Vec3()
Default constructor. |
|
Vec3(float[] v)
Create a Vec3 object with given float array tuple data. |
|
Vec3(float x,
float y,
float z)
Create a Vec3 object with given float tuple data. |
Method Summary | |
Vec3 |
cross(Vec3 vec)
Computes vector cross product. |
void |
normalize()
Makes this Vec3 of normal unit length. |
java.lang.String |
toString()
|
float |
v(int i)
Return the i-th element of the 3-tuple. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public float x
public float y
public float z
Constructor Detail |
public Vec3()
Default constructor.
public Vec3(float x, float y, float z)
Create a Vec3 object with given float tuple data.
public Vec3(float[] v)
Create a Vec3 object with given float array tuple data.
Method Detail |
public float v(int i)
Return the i-th element of the 3-tuple.
public Vec3 cross(Vec3 vec)
Computes vector cross product.
vec
- tuple to do the cross product withpublic void normalize()
Makes this Vec3 of normal unit length.
public java.lang.String toString()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |