|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectm3g12.Quaternion
public class Quaternion
Quaternion implementation.
| Field Summary | |
|---|---|
private float |
w
Quaternion element. |
private float |
x
Quaternion element. |
private float |
y
Quaternion element. |
private float |
z
Quaternion element. |
| Constructor Summary | |
|---|---|
Quaternion()
Creates a new quaternion and initializes it to the identity. |
|
Quaternion(float x,
float y,
float z,
float w)
Creates a new quaternion and initializes it to the given values. |
|
| Method Summary | |
|---|---|
float |
getW()
Getter for w value. |
float |
getX()
Getter for x value. |
float |
getY()
Getter for y value. |
float |
getZ()
Getter for z value. |
Quaternion |
normalize()
Normalizes this quaternion. |
Quaternion |
postMultiply(Quaternion rhs)
Multiplies this quaternion from the right by the given quaternion. |
void |
set(float x,
float y,
float z,
float w)
Sets this quaternion to the given values. |
Quaternion |
setAxisAngle(float angle,
float ax,
float ay,
float az)
Sets the values of this quaternion by converting the given axis-angle values. |
Quaternion |
setEuler(float rx,
float ry,
float rz)
Sets the values of this quaternion by converting the given Euler angles. |
void |
setIdentity()
Resets this quaternion to the identity. |
java.lang.String |
toString()
Returns a String representation of this class. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private float x
private float y
private float z
private float w
| Constructor Detail |
|---|
public Quaternion()
public Quaternion(float x,
float y,
float z,
float w)
x - x value.y - y value.z - z value.w - w value.| Method Detail |
|---|
public void setIdentity()
public void set(float x,
float y,
float z,
float w)
x - x value.y - y value.z - z value.w - w value.public float getX()
public float getY()
public float getZ()
public float getW()
public Quaternion setAxisAngle(float angle,
float ax,
float ay,
float az)
angle - angle of rotation around the axis, in degrees.ax - x component of the rotation axis.ay - y component of the rotation axis.az - z component of the rotation axis.
public Quaternion setEuler(float rx,
float ry,
float rz)
rx - angle of rotation around x axis, in degrees.ry - angle of rotation around y axis, in degrees.rz - angle of rotation around z axis, in degrees.
public Quaternion postMultiply(Quaternion rhs)
rhs - the right hand side quaternion.
public Quaternion normalize()
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 | ||||||||