|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.jinx.slowmath.Quaternion
public class Quaternion
Constructor Summary | |
---|---|
Quaternion()
|
|
Quaternion(Real[] vec)
Constructs a new Quaternion with the given W/X/Y/Z coordinates. |
|
Quaternion(Real x,
Real y,
Real z,
Real w)
Constructs a new Quaternion with the given W/X/Y/Z coordinates. |
|
Quaternion(java.lang.String s)
Constructs a new Quaternion by parsing the given String. |
|
Quaternion(Vector v,
Real w)
|
Method Summary | |
---|---|
Quaternion |
add(Quaternion q)
|
Quaternion |
add(Real n)
|
Quaternion |
conjugate()
|
Quaternion |
divide(Quaternion q)
|
Quaternion |
divide(Real n)
|
Vector |
getV()
|
Real |
getW()
Provides the W coordinate. |
Real |
getX()
Provides the X coordinate. |
Real |
getY()
Provides the Y coordinate. |
Real |
getZ()
Provides the Z coordinate. |
Quaternion |
invert()
|
Real |
magnitude()
|
Quaternion |
multiply(Quaternion q2)
|
Quaternion |
multiply(Real n)
|
Quaternion |
normalize()
|
Quaternion |
subtract(Quaternion q)
|
Quaternion |
subtract(Real n)
|
double[] |
toDoubleArray()
Converts this Quaternion to a double array. |
float[] |
toFloatArray()
Converts this Quaternion to a float array. |
java.lang.String |
toString()
Provides a String representation of this Vector. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Quaternion()
public Quaternion(Real x, Real y, Real z, Real w)
w
- the W coordinate.x
- the X coordinate.y
- the Y coordinate.z
- the Z coordinate.public Quaternion(Real[] vec)
vec
- the coordinates in an array.public Quaternion(Vector v, Real w)
public Quaternion(java.lang.String s)
s
- the String to parse.Method Detail |
---|
public Real getW()
public Vector getV()
public Real getX()
public Real getY()
public Real getZ()
public Quaternion add(Real n)
public Quaternion add(Quaternion q)
public Quaternion subtract(Real n)
public Quaternion subtract(Quaternion q)
public Quaternion multiply(Real n)
public Quaternion multiply(Quaternion q2)
public Quaternion conjugate()
public Quaternion invert()
public Quaternion divide(Real n)
public Quaternion divide(Quaternion q)
public Real magnitude()
public Quaternion normalize()
public float[] toFloatArray()
public double[] toDoubleArray()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |