Package org.lwjglx.util.vector
Class Quaternion
java.lang.Object
org.lwjglx.util.vector.Vector
org.lwjglx.util.vector.Quaternion
- All Implemented Interfaces:
java.io.Serializable
,ReadableVector
,ReadableVector2f
,ReadableVector3f
,ReadableVector4f
public class Quaternion extends Vector implements ReadableVector4f
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Quaternion()
Quaternion(float float1, float float2, float float3, float float4)
Quaternion(ReadableVector4f readableVector4f)
-
Method Summary
Modifier and Type Method Description static float
dot(Quaternion quaternion, Quaternion quaternion2)
float
getW()
float
getX()
float
getY()
float
getZ()
float
lengthSquared()
Vector
load(java.nio.FloatBuffer floatBuffer)
static Quaternion
mul(Quaternion quaternion, Quaternion quaternion2, Quaternion quaternion3)
static Quaternion
mulInverse(Quaternion quaternion, Quaternion quaternion2, Quaternion quaternion3)
Vector
negate()
Quaternion
negate(Quaternion quaternion)
static Quaternion
negate(Quaternion quaternion, Quaternion quaternion2)
Quaternion
normalise(Quaternion quaternion)
static Quaternion
normalise(Quaternion quaternion, Quaternion quaternion2)
Vector
scale(float float1)
static Quaternion
scale(float float1, Quaternion quaternion, Quaternion quaternion2)
void
set(float float1, float float2)
void
set(float float1, float float2, float float3)
void
set(float float1, float float2, float float3, float float4)
Quaternion
set(ReadableVector4f readableVector4f)
void
setFromAxisAngle(Vector4f vector4f)
Quaternion
setFromMatrix(Matrix3f matrix3f)
static Quaternion
setFromMatrix(Matrix3f matrix3f, Quaternion quaternion)
Quaternion
setFromMatrix(Matrix4f matrix4f)
static Quaternion
setFromMatrix(Matrix4f matrix4f, Quaternion quaternion)
Quaternion
setIdentity()
static Quaternion
setIdentity(Quaternion quaternion)
void
setW(float float1)
void
setX(float float1)
void
setY(float float1)
void
setZ(float float1)
Vector
store(java.nio.FloatBuffer floatBuffer)
java.lang.String
toString()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.lwjglx.util.vector.ReadableVector
length
-
Field Details
-
x
public float x -
y
public float y -
z
public float z -
w
public float w
-
-
Constructor Details
-
Quaternion
public Quaternion() -
Quaternion
-
Quaternion
public Quaternion(float float1, float float2, float float3, float float4)
-
-
Method Details
-
set
public void set(float float1, float float2) -
set
public void set(float float1, float float2, float float3) -
set
public void set(float float1, float float2, float float3, float float4) -
set
-
setIdentity
-
setIdentity
-
lengthSquared
public float lengthSquared()- Specified by:
lengthSquared
in interfaceReadableVector
- Specified by:
lengthSquared
in classVector
-
normalise
-
normalise
-
dot
-
negate
-
negate
-
negate
-
load
-
scale
-
scale
-
store
- Specified by:
store
in interfaceReadableVector
- Specified by:
store
in classVector
-
getX
public final float getX()- Specified by:
getX
in interfaceReadableVector2f
-
getY
public final float getY()- Specified by:
getY
in interfaceReadableVector2f
-
setX
public final void setX(float float1) -
setY
public final void setY(float float1) -
setZ
public void setZ(float float1) -
getZ
public float getZ()- Specified by:
getZ
in interfaceReadableVector3f
-
setW
public void setW(float float1) -
getW
public float getW()- Specified by:
getW
in interfaceReadableVector4f
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
mul
public static Quaternion mul(Quaternion quaternion, Quaternion quaternion2, Quaternion quaternion3) -
mulInverse
public static Quaternion mulInverse(Quaternion quaternion, Quaternion quaternion2, Quaternion quaternion3) -
setFromAxisAngle
-
setFromMatrix
-
setFromMatrix
-
setFromMatrix
-
setFromMatrix
-