Class Quaternion
Inheritance
java.lang.Object
Quaternion
Syntax
Constructors
Quaternion()
Declaration
Quaternion(float x, float y, float z, float w)
Declaration
public Quaternion(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Quaternion(Matrix4f rot)
Declaration
public Quaternion(Matrix4f rot)
Parameters
Quaternion(Quaternion r)
Declaration
public Quaternion(Quaternion r)
Parameters
Quaternion(Vector3f axis, float anglerad)
Declaration
public Quaternion(Vector3f axis, float anglerad)
Parameters
Type |
Name |
Description |
Vector3f |
axis |
|
float |
anglerad |
|
Methods
add(float x, float y, float z, float w)
Declaration
public Quaternion add(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Returns
add(Quaternion r)
Declaration
public Quaternion add(Quaternion r)
Parameters
Returns
conjugate()
Declaration
public Quaternion conjugate()
Returns
dot(float x, float y, float z, float w)
Declaration
public float dot(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Returns
dot(Quaternion r)
Declaration
public float dot(Quaternion r)
Parameters
Returns
equals(Quaternion r)
Declaration
public boolean equals(Quaternion r)
Parameters
Returns
getBack()
Declaration
public Vector3f getBack()
Returns
getDown()
Declaration
public Vector3f getDown()
Returns
getForward()
Declaration
public Vector3f getForward()
Returns
getLeft()
Declaration
public Vector3f getLeft()
Returns
getRight()
Declaration
public Vector3f getRight()
Returns
getUp()
Declaration
Returns
getW()
Declaration
Returns
getX()
Declaration
Returns
getY()
Declaration
Returns
getZ()
Declaration
Returns
initRotationRad(Vector3f axis, float angleInRadians)
Declaration
public Quaternion initRotationRad(Vector3f axis, float angleInRadians)
Parameters
Type |
Name |
Description |
Vector3f |
axis |
|
float |
angleInRadians |
|
Returns
length()
Declaration
Returns
mul(float r)
Declaration
public Quaternion mul(float r)
Parameters
Type |
Name |
Description |
float |
r |
|
Returns
mul(Quaternion r)
Declaration
public Quaternion mul(Quaternion r)
Parameters
Returns
mul(Vector3f r)
Declaration
public Quaternion mul(Vector3f r)
Parameters
Returns
mul(Vector3i r)
Declaration
public Quaternion mul(Vector3i r)
Parameters
Returns
nlerp(Quaternion dest, float lerpFactor, boolean shortest)
Declaration
public Quaternion nlerp(Quaternion dest, float lerpFactor, boolean shortest)
Parameters
Type |
Name |
Description |
Quaternion |
dest |
|
float |
lerpFactor |
|
boolean |
shortest |
|
Returns
normalize()
Declaration
public Quaternion normalize()
Returns
rotate(Vector3f axis, float angleRad)
Declaration
public Quaternion rotate(Vector3f axis, float angleRad)
Parameters
Type |
Name |
Description |
Vector3f |
axis |
|
float |
angleRad |
|
Returns
set(float x, float y, float z, float w)
Declaration
public Quaternion set(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Returns
set(Quaternion other)
Declaration
public Quaternion set(Quaternion other)
Parameters
Returns
setW(float w)
Declaration
public void setW(float w)
Parameters
Type |
Name |
Description |
float |
w |
|
setX(float x)
Declaration
public void setX(float x)
Parameters
Type |
Name |
Description |
float |
x |
|
setY(float y)
Declaration
public void setY(float y)
Parameters
Type |
Name |
Description |
float |
y |
|
setZ(float z)
Declaration
public void setZ(float z)
Parameters
Type |
Name |
Description |
float |
z |
|
slerp(Quaternion dest, float lerpFactor, boolean shortest)
Declaration
public Quaternion slerp(Quaternion dest, float lerpFactor, boolean shortest)
Parameters
Type |
Name |
Description |
Quaternion |
dest |
|
float |
lerpFactor |
|
boolean |
shortest |
|
Returns
sub(float x, float y, float z, float w)
Declaration
public Quaternion sub(float x, float y, float z, float w)
Parameters
Type |
Name |
Description |
float |
x |
|
float |
y |
|
float |
z |
|
float |
w |
|
Returns
sub(Quaternion r)
Declaration
public Quaternion sub(Quaternion r)
Parameters
Returns
toRotationMatrix()
Declaration
public Matrix4f toRotationMatrix()
Returns