Package org.joml
Class Matrix3f
java.lang.Object
org.joml.Matrix3f
- All Implemented Interfaces:
java.io.Externalizable
,java.io.Serializable
,Matrix3fc
public class Matrix3f extends java.lang.Object implements java.io.Externalizable, Matrix3fc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Matrix3f()
Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
Matrix3f(java.nio.FloatBuffer buffer)
Matrix3f(Matrix3fc mat)
Matrix3f(Matrix4fc mat)
Matrix3f(Vector3fc col0, Vector3fc col1, Vector3fc col2)
-
Method Summary
Modifier and Type Method Description Matrix3f
add(Matrix3fc other)
Matrix3f
add(Matrix3fc other, Matrix3f dest)
float
determinant()
boolean
equals(java.lang.Object obj)
float[]
get(float[] arr)
float[]
get(float[] arr, int offset)
java.nio.ByteBuffer
get(int index, java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
get(int index, java.nio.FloatBuffer buffer)
java.nio.ByteBuffer
get(java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
get(java.nio.FloatBuffer buffer)
Matrix3f
get(Matrix3f dest)
Matrix4f
get(Matrix4f dest)
Vector3f
getColumn(int column, Vector3f dest)
Vector3f
getEulerAnglesZYX(Vector3f dest)
Quaterniond
getNormalizedRotation(Quaterniond dest)
Quaternionf
getNormalizedRotation(Quaternionf dest)
AxisAngle4f
getRotation(AxisAngle4f dest)
Vector3f
getRow(int row, Vector3f dest)
Vector3f
getScale(Vector3f dest)
java.nio.ByteBuffer
getTransposed(int index, java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
getTransposed(int index, java.nio.FloatBuffer buffer)
java.nio.ByteBuffer
getTransposed(java.nio.ByteBuffer buffer)
java.nio.FloatBuffer
getTransposed(java.nio.FloatBuffer buffer)
Quaterniond
getUnnormalizedRotation(Quaterniond dest)
Quaternionf
getUnnormalizedRotation(Quaternionf dest)
int
hashCode()
Matrix3f
identity()
Matrix3f
invert()
Matrix3f
invert(Matrix3f dest)
Matrix3f
lerp(Matrix3fc other, float t)
Matrix3f
lerp(Matrix3fc other, float t, Matrix3f dest)
Matrix3f
lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Matrix3f
lookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)
Matrix3f
lookAlong(Vector3fc dir, Vector3fc up)
Matrix3f
lookAlong(Vector3fc dir, Vector3fc up, Matrix3f dest)
float
m00()
Matrix3f
m00(float m00)
float
m01()
Matrix3f
m01(float m01)
float
m02()
Matrix3f
m02(float m02)
float
m10()
Matrix3f
m10(float m10)
float
m11()
Matrix3f
m11(float m11)
float
m12()
Matrix3f
m12(float m12)
float
m20()
Matrix3f
m20(float m20)
float
m21()
Matrix3f
m21(float m21)
float
m22()
Matrix3f
m22(float m22)
Matrix3f
mul(Matrix3fc right)
Matrix3f
mul(Matrix3fc right, Matrix3f dest)
Matrix3f
mulComponentWise(Matrix3fc other)
Matrix3f
mulComponentWise(Matrix3fc other, Matrix3f dest)
Matrix3f
normal()
Matrix3f
normal(Matrix3f dest)
Vector3f
normalizedPositiveX(Vector3f dir)
Vector3f
normalizedPositiveY(Vector3f dir)
Vector3f
normalizedPositiveZ(Vector3f dir)
Vector3f
positiveX(Vector3f dir)
Vector3f
positiveY(Vector3f dir)
Vector3f
positiveZ(Vector3f dir)
void
readExternal(java.io.ObjectInput in)
Matrix3f
rotate(float ang, float x, float y, float z)
Matrix3f
rotate(float ang, float x, float y, float z, Matrix3f dest)
Matrix3f
rotate(float angle, Vector3fc axis)
Matrix3f
rotate(float angle, Vector3fc axis, Matrix3f dest)
Matrix3f
rotate(AxisAngle4f axisAngle)
Matrix3f
rotate(AxisAngle4f axisAngle, Matrix3f dest)
Matrix3f
rotate(Quaternionfc quat)
Matrix3f
rotate(Quaternionfc quat, Matrix3f dest)
Matrix3f
rotateLocal(float ang, float x, float y, float z)
Matrix3f
rotateLocal(float ang, float x, float y, float z, Matrix3f dest)
Matrix3f
rotateLocal(Quaternionfc quat)
Matrix3f
rotateLocal(Quaternionfc quat, Matrix3f dest)
Matrix3f
rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Matrix3f
rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)
Matrix3f
rotateTowards(Vector3fc direction, Vector3fc up)
Matrix3f
rotateTowards(Vector3fc direction, Vector3fc up, Matrix3f dest)
Matrix3f
rotateX(float ang)
Matrix3f
rotateX(float ang, Matrix3f dest)
Matrix3f
rotateXYZ(float angleX, float angleY, float angleZ)
Matrix3f
rotateXYZ(float angleX, float angleY, float angleZ, Matrix3f dest)
Matrix3f
rotateXYZ(Vector3f angles)
Matrix3f
rotateY(float ang)
Matrix3f
rotateY(float ang, Matrix3f dest)
Matrix3f
rotateYXZ(float angleY, float angleX, float angleZ)
Matrix3f
rotateYXZ(float angleY, float angleX, float angleZ, Matrix3f dest)
Matrix3f
rotateYXZ(Vector3f angles)
Matrix3f
rotateZ(float ang)
Matrix3f
rotateZ(float ang, Matrix3f dest)
Matrix3f
rotateZYX(float angleZ, float angleY, float angleX)
Matrix3f
rotateZYX(float angleZ, float angleY, float angleX, Matrix3f dest)
Matrix3f
rotateZYX(Vector3f angles)
Matrix3f
rotation(float angle, float x, float y, float z)
Matrix3f
rotation(float angle, Vector3fc axis)
Matrix3f
rotation(AxisAngle4f axisAngle)
Matrix3f
rotation(Quaternionfc quat)
Matrix3f
rotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Matrix3f
rotationTowards(Vector3fc dir, Vector3fc up)
Matrix3f
rotationX(float ang)
Matrix3f
rotationXYZ(float angleX, float angleY, float angleZ)
Matrix3f
rotationY(float ang)
Matrix3f
rotationYXZ(float angleY, float angleX, float angleZ)
Matrix3f
rotationZ(float ang)
Matrix3f
rotationZYX(float angleZ, float angleY, float angleX)
Matrix3f
scale(float xyz)
Matrix3f
scale(float x, float y, float z)
Matrix3f
scale(float x, float y, float z, Matrix3f dest)
Matrix3f
scale(float xyz, Matrix3f dest)
Matrix3f
scale(Vector3fc xyz)
Matrix3f
scale(Vector3fc xyz, Matrix3f dest)
Matrix3f
scaleLocal(float x, float y, float z)
Matrix3f
scaleLocal(float x, float y, float z, Matrix3f dest)
Matrix3f
scaling(float factor)
Matrix3f
scaling(float x, float y, float z)
Matrix3f
scaling(Vector3fc xyz)
Matrix3f
set(float[] m)
Matrix3f
set(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
Matrix3f
set(java.nio.ByteBuffer buffer)
Matrix3f
set(java.nio.FloatBuffer buffer)
Matrix3f
set(AxisAngle4d axisAngle)
Matrix3f
set(AxisAngle4f axisAngle)
Matrix3f
set(Matrix3fc m)
Matrix3f
set(Matrix4fc mat)
Matrix3f
set(Quaterniondc q)
Matrix3f
set(Quaternionfc q)
Matrix3f
set(Vector3fc col0, Vector3fc col1, Vector3fc col2)
Matrix3f
setColumn(int column, Vector3fc src)
Matrix3f
setLookAlong(float dirX, float dirY, float dirZ, float upX, float upY, float upZ)
Matrix3f
setLookAlong(Vector3fc dir, Vector3fc up)
Matrix3f
setRow(int row, Vector3fc src)
Matrix3f
setSkewSymmetric(float a, float b, float c)
Matrix3f
sub(Matrix3fc subtrahend)
Matrix3f
sub(Matrix3fc subtrahend, Matrix3f dest)
Matrix3f
swap(Matrix3f other)
Matrix3fc
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat formatter)
Vector3f
transform(float x, float y, float z, Vector3f dest)
Vector3f
transform(Vector3f v)
Vector3f
transform(Vector3fc v, Vector3f dest)
Matrix3f
transpose()
Matrix3f
transpose(Matrix3f dest)
void
writeExternal(java.io.ObjectOutput out)
Matrix3f
zero()
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
m00
public float m00 -
m01
public float m01 -
m02
public float m02 -
m10
public float m10 -
m11
public float m11 -
m12
public float m12 -
m20
public float m20 -
m21
public float m21 -
m22
public float m22
-
-
Constructor Details
-
Matrix3f
public Matrix3f() -
Matrix3f
-
Matrix3f
-
Matrix3f
public Matrix3f(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) -
Matrix3f
public Matrix3f(java.nio.FloatBuffer buffer) -
Matrix3f
-
-
Method Details
-
m00
public float m00() -
m01
public float m01() -
m02
public float m02() -
m10
public float m10() -
m11
public float m11() -
m12
public float m12() -
m20
public float m20() -
m21
public float m21() -
m22
public float m22() -
m00
-
m01
-
m02
-
m10
-
m11
-
m12
-
m20
-
m21
-
m22
-
set
-
set
-
set
-
set
-
set
-
set
-
mul
-
mul
-
set
public Matrix3f set(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) -
set
-
set
-
determinant
public float determinant()- Specified by:
determinant
in interfaceMatrix3fc
-
invert
-
invert
-
transpose
-
transpose
-
toString
public java.lang.String toString()- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat formatter) -
get
-
get
-
getRotation
- Specified by:
getRotation
in interfaceMatrix3fc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3fc
-
getNormalizedRotation
- Specified by:
getNormalizedRotation
in interfaceMatrix3fc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3fc
-
getNormalizedRotation
- Specified by:
getNormalizedRotation
in interfaceMatrix3fc
-
get
public java.nio.FloatBuffer get(java.nio.FloatBuffer buffer) -
get
public java.nio.FloatBuffer get(int index, java.nio.FloatBuffer buffer) -
get
public java.nio.ByteBuffer get(java.nio.ByteBuffer buffer) -
get
public java.nio.ByteBuffer get(int index, java.nio.ByteBuffer buffer) -
getTransposed
public java.nio.FloatBuffer getTransposed(java.nio.FloatBuffer buffer)- Specified by:
getTransposed
in interfaceMatrix3fc
-
getTransposed
public java.nio.FloatBuffer getTransposed(int index, java.nio.FloatBuffer buffer)- Specified by:
getTransposed
in interfaceMatrix3fc
-
getTransposed
public java.nio.ByteBuffer getTransposed(java.nio.ByteBuffer buffer)- Specified by:
getTransposed
in interfaceMatrix3fc
-
getTransposed
public java.nio.ByteBuffer getTransposed(int index, java.nio.ByteBuffer buffer)- Specified by:
getTransposed
in interfaceMatrix3fc
-
get
public float[] get(float[] arr, int offset) -
get
public float[] get(float[] arr) -
set
-
set
-
zero
-
identity
-
scale
-
scale
-
scale
-
scale
-
scale
-
scale
-
scaleLocal
- Specified by:
scaleLocal
in interfaceMatrix3fc
-
scaleLocal
-
scaling
-
scaling
-
scaling
-
rotation
-
rotation
-
rotation
-
rotationX
-
rotationY
-
rotationZ
-
rotationXYZ
-
rotationZYX
-
rotationYXZ
-
rotation
-
transform
-
transform
-
transform
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternal
in interfacejava.io.Externalizable
- Throws:
java.io.IOException
java.lang.ClassNotFoundException
-
rotateX
-
rotateX
-
rotateY
-
rotateY
-
rotateZ
-
rotateZ
-
rotateXYZ
-
rotateXYZ
-
rotateXYZ
-
rotateZYX
-
rotateZYX
-
rotateZYX
-
rotateYXZ
-
rotateYXZ
-
rotateYXZ
-
rotate
-
rotate
-
rotateLocal
- Specified by:
rotateLocal
in interfaceMatrix3fc
-
rotateLocal
-
rotate
-
rotate
-
rotateLocal
- Specified by:
rotateLocal
in interfaceMatrix3fc
-
rotateLocal
-
rotate
-
rotate
-
rotate
-
rotate
-
lookAlong
-
lookAlong
-
lookAlong
-
lookAlong
-
setLookAlong
-
setLookAlong
-
getRow
-
setRow
- Throws:
java.lang.IndexOutOfBoundsException
-
getColumn
-
setColumn
- Throws:
java.lang.IndexOutOfBoundsException
-
normal
-
normal
-
getScale
-
positiveZ
-
normalizedPositiveZ
- Specified by:
normalizedPositiveZ
in interfaceMatrix3fc
-
positiveX
-
normalizedPositiveX
- Specified by:
normalizedPositiveX
in interfaceMatrix3fc
-
positiveY
-
normalizedPositiveY
- Specified by:
normalizedPositiveY
in interfaceMatrix3fc
-
hashCode
public int hashCode()- Overrides:
hashCode
in classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equals
in classjava.lang.Object
-
swap
-
add
-
add
-
sub
-
sub
-
mulComponentWise
-
mulComponentWise
- Specified by:
mulComponentWise
in interfaceMatrix3fc
-
setSkewSymmetric
-
lerp
-
lerp
-
rotateTowards
- Specified by:
rotateTowards
in interfaceMatrix3fc
-
rotateTowards
-
rotateTowards
-
rotateTowards
public Matrix3f rotateTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ, Matrix3f dest)- Specified by:
rotateTowards
in interfaceMatrix3fc
-
rotationTowards
-
rotationTowards
public Matrix3f rotationTowards(float dirX, float dirY, float dirZ, float upX, float upY, float upZ) -
getEulerAnglesZYX
- Specified by:
getEulerAnglesZYX
in interfaceMatrix3fc
-
toImmutable
-