public class Quat4f
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
(package private) static double |
EPS2 |
float |
w
The w coordinate.
|
float |
x
The x coordinate.
|
float |
y
The y coordinate.
|
float |
z
The z coordinate.
|
| Constructor and Description |
|---|
Quat4f()
Constructs and initializes a Quat4f to (0,0,0,0).
|
Quat4f(float[] q)
Constructs and initializes a Quat4f from the array of length 4.
|
Quat4f(float x,
float y,
float z,
float w)
Constructs and initializes a Quat4f from the specified xyzw coordinates.
|
Quat4f(Quat4f q1)
Constructs and initializes a Quat4f from the specified Quat4f.
|
| Modifier and Type | Method and Description |
|---|---|
void |
normalize()
Normalizes the value of this quaternion in place.
|
void |
scale(float s)
Sets the value of this Quat4f to the scalar multiplication
of the scale factor with this.
|
void |
set(float[][] m1)
Sets the value of this quaternion to the rotational component of
the passed float matrix.
|
void |
set(Matrix3f m1)
Sets the value of this quaternion to the rotational component of
the passed matrix.
|
java.lang.String |
toString()
Returns a
String that represents the value of this
Quat4f. |
static final double EPS2
public float x
public float y
public float z
public float w
public Quat4f()
public Quat4f(float x,
float y,
float z,
float w)
x - the x coordinatey - the y coordinatez - the z coordinatew - the w scalar componentpublic Quat4f(float[] q)
q - the array of length 4 containing xyzw in orderpublic Quat4f(Quat4f q1)
q1 - the Quat4f containing the initialization x y z w datapublic final void normalize()
public final void set(Matrix3f m1)
m1 - the Matrix3fpublic final void set(float[][] m1)
m1 - the float[3][3] matrixpublic final void scale(float s)
s - the scalar valuepublic java.lang.String toString()
String that represents the value of this
Quat4f.toString in class java.lang.ObjectQuat4f.