|
VeaR/JEllipse | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpl.krakow.cmuj.bioinformatics.jellipse.mathtoolkit.Quaternion
public class Quaternion
Contains tools to perform fast rotations and is not intended to be complete, sufficient or robust for any other task related to quaternions.
Field Summary | |
---|---|
(package private) float[] |
q
|
Constructor Summary | |
---|---|
Quaternion()
Creates new unit quaternon (w == 1.f). |
|
Quaternion(float[][] matrix)
Creates new quaternion from a matrix given. |
|
Quaternion(float roll,
float pitch,
float yaw)
Creates a new instance of the Quaternion with given angles of rotation. |
Method Summary | |
---|---|
float |
getW()
Gets the scalar value of the quaternion. |
float |
getX()
Gets the first vector value of the quaternion. |
float |
getY()
Gets the second vector value of the quaternion. |
float |
getZ()
Gets the third vector value of the quaternion. |
Quaternion |
multiply(Quaternion q2)
Multiplies current quaternion (as left one) with another (as right one). |
void |
setW(float w)
Sets the scalar value of the quaternion. |
void |
setX(float x)
Sets the first vector value of the quaternion. |
void |
setY(float y)
Sets the second vector value of the quaternion. |
void |
setZ(float z)
Sets the third vector value of the quaternion. |
float[] |
toRotationMatrix16()
Converts the current quaternion to a rotation matrix with 16 elements. |
float[][] |
toRotationMatrix4x4()
Converts the current quaternion to a rotation matrix 4x4. |
float[] |
toRotationMatrix9()
Converts the current quaternion to a rotation matrix with 9 elements. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
float[] q
Constructor Detail |
---|
public Quaternion()
public Quaternion(float[][] matrix)
matrix
- base 4x4 matrixpublic Quaternion(float roll, float pitch, float yaw)
Method Detail |
---|
public float getW()
public float getX()
public float getY()
public float getZ()
public void setW(float w)
w
- the scalar value of the quaternion to be setpublic void setX(float x)
x
- the first vector value of the quaternion to be setpublic void setY(float y)
y
- the second vector value of the quaternion to be setpublic void setZ(float z)
z
- the third vector value of the quaternion to be setpublic Quaternion multiply(Quaternion q2)
q2
- another quaternion (right in multiplication)
public float[][] toRotationMatrix4x4()
public float[] toRotationMatrix16()
public float[] toRotationMatrix9()
|
VeaR/JEllipse | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |