Package org.joml
Class Matrix3d
java.lang.Object
org.joml.Matrix3d
- All Implemented Interfaces:
java.io.Externalizable,java.io.Serializable,Matrix3dc
public class Matrix3d extends java.lang.Object implements java.io.Externalizable, Matrix3dc
- See Also:
- Serialized Form
-
Field Summary
-
Constructor Summary
Constructors Constructor Description Matrix3d()Matrix3d(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)Matrix3d(java.nio.DoubleBuffer buffer)Matrix3d(Matrix3dc mat)Matrix3d(Matrix3fc mat)Matrix3d(Matrix4dc mat)Matrix3d(Matrix4fc mat)Matrix3d(Vector3dc col0, Vector3dc col1, Vector3dc col2) -
Method Summary
Modifier and Type Method Description Matrix3dadd(Matrix3dc other)Matrix3dadd(Matrix3dc other, Matrix3d dest)doubledeterminant()booleanequals(java.lang.Object obj)double[]get(double[] arr)double[]get(double[] arr, int offset)float[]get(float[] arr)float[]get(float[] arr, int offset)java.nio.ByteBufferget(int index, java.nio.ByteBuffer buffer)java.nio.DoubleBufferget(int index, java.nio.DoubleBuffer buffer)java.nio.FloatBufferget(int index, java.nio.FloatBuffer buffer)java.nio.ByteBufferget(java.nio.ByteBuffer buffer)java.nio.DoubleBufferget(java.nio.DoubleBuffer buffer)java.nio.FloatBufferget(java.nio.FloatBuffer buffer)Matrix3dget(Matrix3d dest)Vector3dgetColumn(int column, Vector3d dest)Vector3dgetEulerAnglesZYX(Vector3d dest)java.nio.ByteBuffergetFloats(int index, java.nio.ByteBuffer buffer)java.nio.ByteBuffergetFloats(java.nio.ByteBuffer buffer)QuaterniondgetNormalizedRotation(Quaterniond dest)QuaternionfgetNormalizedRotation(Quaternionf dest)AxisAngle4fgetRotation(AxisAngle4f dest)Vector3dgetRow(int row, Vector3d dest)Vector3dgetScale(Vector3d dest)QuaterniondgetUnnormalizedRotation(Quaterniond dest)QuaternionfgetUnnormalizedRotation(Quaternionf dest)inthashCode()Matrix3didentity()Matrix3dinvert()Matrix3dinvert(Matrix3d dest)Matrix3dlerp(Matrix3dc other, double t)Matrix3dlerp(Matrix3dc other, double t, Matrix3d dest)Matrix3dlookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)Matrix3dlookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)Matrix3dlookAlong(Vector3dc dir, Vector3dc up)Matrix3dlookAlong(Vector3dc dir, Vector3dc up, Matrix3d dest)doublem00()Matrix3dm00(double m00)doublem01()Matrix3dm01(double m01)doublem02()Matrix3dm02(double m02)doublem10()Matrix3dm10(double m10)doublem11()Matrix3dm11(double m11)doublem12()Matrix3dm12(double m12)doublem20()Matrix3dm20(double m20)doublem21()Matrix3dm21(double m21)doublem22()Matrix3dm22(double m22)Matrix3dmul(Matrix3dc right)Matrix3dmul(Matrix3dc right, Matrix3d dest)Matrix3dmul(Matrix3fc right)Matrix3dmul(Matrix3fc right, Matrix3d dest)Matrix3dmulComponentWise(Matrix3dc other)Matrix3dmulComponentWise(Matrix3dc other, Matrix3d dest)Matrix3dnormal()Matrix3dnormal(Matrix3d dest)Vector3dnormalizedPositiveX(Vector3d dir)Vector3dnormalizedPositiveY(Vector3d dir)Vector3dnormalizedPositiveZ(Vector3d dir)Vector3dpositiveX(Vector3d dir)Vector3dpositiveY(Vector3d dir)Vector3dpositiveZ(Vector3d dir)voidreadExternal(java.io.ObjectInput in)Matrix3drotate(double ang, double x, double y, double z)Matrix3drotate(double ang, double x, double y, double z, Matrix3d dest)Matrix3drotate(double angle, Vector3dc axis)Matrix3drotate(double angle, Vector3dc axis, Matrix3d dest)Matrix3drotate(double angle, Vector3fc axis)Matrix3drotate(double angle, Vector3fc axis, Matrix3d dest)Matrix3drotate(AxisAngle4d axisAngle)Matrix3drotate(AxisAngle4d axisAngle, Matrix3d dest)Matrix3drotate(AxisAngle4f axisAngle)Matrix3drotate(AxisAngle4f axisAngle, Matrix3d dest)Matrix3drotate(Quaterniondc quat)Matrix3drotate(Quaterniondc quat, Matrix3d dest)Matrix3drotate(Quaternionfc quat)Matrix3drotate(Quaternionfc quat, Matrix3d dest)Matrix3drotateLocal(double ang, double x, double y, double z)Matrix3drotateLocal(double ang, double x, double y, double z, Matrix3d dest)Matrix3drotateLocal(Quaterniondc quat)Matrix3drotateLocal(Quaterniondc quat, Matrix3d dest)Matrix3drotateLocal(Quaternionfc quat)Matrix3drotateLocal(Quaternionfc quat, Matrix3d dest)Matrix3drotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)Matrix3drotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)Matrix3drotateTowards(Vector3dc direction, Vector3dc up)Matrix3drotateTowards(Vector3dc direction, Vector3dc up, Matrix3d dest)Matrix3drotateX(double ang)Matrix3drotateX(double ang, Matrix3d dest)Matrix3drotateXYZ(double angleX, double angleY, double angleZ)Matrix3drotateXYZ(double angleX, double angleY, double angleZ, Matrix3d dest)Matrix3drotateY(double ang)Matrix3drotateY(double ang, Matrix3d dest)Matrix3drotateYXZ(double angleY, double angleX, double angleZ)Matrix3drotateYXZ(double angleY, double angleX, double angleZ, Matrix3d dest)Matrix3drotateYXZ(Vector3d angles)Matrix3drotateZ(double ang)Matrix3drotateZ(double ang, Matrix3d dest)Matrix3drotateZYX(double angleZ, double angleY, double angleX)Matrix3drotateZYX(double angleZ, double angleY, double angleX, Matrix3d dest)Matrix3drotation(double angle, double x, double y, double z)Matrix3drotation(double angle, Vector3dc axis)Matrix3drotation(double angle, Vector3fc axis)Matrix3drotation(AxisAngle4d axisAngle)Matrix3drotation(AxisAngle4f axisAngle)Matrix3drotation(Quaterniondc quat)Matrix3drotation(Quaternionfc quat)Matrix3drotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)Matrix3drotationTowards(Vector3dc dir, Vector3dc up)Matrix3drotationX(double ang)Matrix3drotationXYZ(double angleX, double angleY, double angleZ)Matrix3drotationY(double ang)Matrix3drotationYXZ(double angleY, double angleX, double angleZ)Matrix3drotationZ(double ang)Matrix3drotationZYX(double angleZ, double angleY, double angleX)Matrix3dscale(double xyz)Matrix3dscale(double x, double y, double z)Matrix3dscale(double x, double y, double z, Matrix3d dest)Matrix3dscale(double xyz, Matrix3d dest)Matrix3dscale(Vector3dc xyz)Matrix3dscale(Vector3dc xyz, Matrix3d dest)Matrix3dscaleLocal(double x, double y, double z)Matrix3dscaleLocal(double x, double y, double z, Matrix3d dest)Matrix3dscaling(double factor)Matrix3dscaling(double x, double y, double z)Matrix3dscaling(Vector3dc xyz)Matrix3dset(double[] m)Matrix3dset(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)Matrix3dset(float[] m)Matrix3dset(java.nio.ByteBuffer buffer)Matrix3dset(java.nio.DoubleBuffer buffer)Matrix3dset(java.nio.FloatBuffer buffer)Matrix3dset(AxisAngle4d axisAngle)Matrix3dset(AxisAngle4f axisAngle)Matrix3dset(Matrix3dc m)Matrix3dset(Matrix3fc m)Matrix3dset(Matrix4dc mat)Matrix3dset(Matrix4fc mat)Matrix3dset(Quaterniondc q)Matrix3dset(Quaternionfc q)Matrix3dset(Vector3dc col0, Vector3dc col1, Vector3dc col2)Matrix3dsetColumn(int column, Vector3dc src)Matrix3dsetFloats(java.nio.ByteBuffer buffer)Matrix3dsetLookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)Matrix3dsetLookAlong(Vector3dc dir, Vector3dc up)Matrix3dsetRow(int row, Vector3dc src)Matrix3dsetSkewSymmetric(double a, double b, double c)Matrix3dsub(Matrix3dc subtrahend)Matrix3dsub(Matrix3dc subtrahend, Matrix3d dest)Matrix3dswap(Matrix3d other)Matrix3dctoImmutable()java.lang.StringtoString()java.lang.StringtoString(java.text.NumberFormat formatter)Vector3dtransform(double x, double y, double z, Vector3d dest)Vector3dtransform(Vector3d v)Vector3dtransform(Vector3dc v, Vector3d dest)Matrix3dtranspose()Matrix3dtranspose(Matrix3d dest)voidwriteExternal(java.io.ObjectOutput out)Matrix3dzero()Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Field Details
-
m00
public double m00 -
m01
public double m01 -
m02
public double m02 -
m10
public double m10 -
m11
public double m11 -
m12
public double m12 -
m20
public double m20 -
m21
public double m21 -
m22
public double m22
-
-
Constructor Details
-
Matrix3d
public Matrix3d() -
Matrix3d
-
Matrix3d
-
Matrix3d
-
Matrix3d
-
Matrix3d
public Matrix3d(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) -
Matrix3d
public Matrix3d(java.nio.DoubleBuffer buffer) -
Matrix3d
-
-
Method Details
-
m00
public double m00() -
m01
public double m01() -
m02
public double m02() -
m10
public double m10() -
m11
public double m11() -
m12
public double m12() -
m20
public double m20() -
m21
public double m21() -
m22
public double m22() -
m00
-
m01
-
m02
-
m10
-
m11
-
m12
-
m20
-
m21
-
m22
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
set
-
mul
-
mul
-
mul
-
mul
-
set
public Matrix3d set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22) -
set
-
set
-
determinant
public double determinant()- Specified by:
determinantin interfaceMatrix3dc
-
invert
-
invert
-
transpose
-
transpose
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(java.text.NumberFormat formatter) -
get
-
getRotation
- Specified by:
getRotationin interfaceMatrix3dc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotationin interfaceMatrix3dc
-
getNormalizedRotation
- Specified by:
getNormalizedRotationin interfaceMatrix3dc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotationin interfaceMatrix3dc
-
getNormalizedRotation
- Specified by:
getNormalizedRotationin interfaceMatrix3dc
-
get
public java.nio.DoubleBuffer get(java.nio.DoubleBuffer buffer) -
get
public java.nio.DoubleBuffer get(int index, java.nio.DoubleBuffer buffer) -
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) -
getFloats
public java.nio.ByteBuffer getFloats(java.nio.ByteBuffer buffer) -
getFloats
public java.nio.ByteBuffer getFloats(int index, java.nio.ByteBuffer buffer) -
get
public double[] get(double[] arr, int offset) -
get
public double[] get(double[] arr) -
get
public float[] get(float[] arr, int offset) -
get
public float[] get(float[] arr) -
set
-
set
-
set
-
setFloats
-
set
-
zero
-
identity
-
scaling
-
scaling
-
scaling
-
scale
-
scale
-
scale
-
scale
-
scale
-
scale
-
scaleLocal
- Specified by:
scaleLocalin interfaceMatrix3dc
-
scaleLocal
-
rotation
-
rotation
-
rotation
-
rotation
-
rotation
-
rotationX
-
rotationY
-
rotationZ
-
rotationXYZ
-
rotationZYX
-
rotationYXZ
-
rotation
-
rotation
-
transform
-
transform
-
transform
-
writeExternal
public void writeExternal(java.io.ObjectOutput out) throws java.io.IOException- Specified by:
writeExternalin interfacejava.io.Externalizable- Throws:
java.io.IOException
-
readExternal
public void readExternal(java.io.ObjectInput in) throws java.io.IOException, java.lang.ClassNotFoundException- Specified by:
readExternalin interfacejava.io.Externalizable- Throws:
java.io.IOExceptionjava.lang.ClassNotFoundException
-
rotateX
-
rotateX
-
rotateY
-
rotateY
-
rotateZ
-
rotateZ
-
rotateXYZ
-
rotateXYZ
-
rotateZYX
-
rotateZYX
-
rotateYXZ
-
rotateYXZ
-
rotateYXZ
-
rotate
-
rotate
-
rotateLocal
- Specified by:
rotateLocalin interfaceMatrix3dc
-
rotateLocal
-
rotateLocal
- Specified by:
rotateLocalin interfaceMatrix3dc
-
rotateLocal
-
rotateLocal
- Specified by:
rotateLocalin interfaceMatrix3dc
-
rotateLocal
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
rotate
-
getRow
-
setRow
- Throws:
java.lang.IndexOutOfBoundsException
-
getColumn
-
setColumn
- Throws:
java.lang.IndexOutOfBoundsException
-
normal
-
normal
-
lookAlong
-
lookAlong
-
lookAlong
-
lookAlong
public Matrix3d lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
setLookAlong
-
setLookAlong
public Matrix3d setLookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
getScale
-
positiveZ
-
normalizedPositiveZ
- Specified by:
normalizedPositiveZin interfaceMatrix3dc
-
positiveX
-
normalizedPositiveX
- Specified by:
normalizedPositiveXin interfaceMatrix3dc
-
positiveY
-
normalizedPositiveY
- Specified by:
normalizedPositiveYin interfaceMatrix3dc
-
hashCode
public int hashCode()- Overrides:
hashCodein classjava.lang.Object
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classjava.lang.Object
-
swap
-
add
-
add
-
sub
-
sub
-
mulComponentWise
-
mulComponentWise
- Specified by:
mulComponentWisein interfaceMatrix3dc
-
setSkewSymmetric
-
lerp
-
lerp
-
rotateTowards
- Specified by:
rotateTowardsin interfaceMatrix3dc
-
rotateTowards
-
rotateTowards
public Matrix3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
rotateTowards
public Matrix3d rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)- Specified by:
rotateTowardsin interfaceMatrix3dc
-
rotationTowards
-
rotationTowards
public Matrix3d rotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
getEulerAnglesZYX
- Specified by:
getEulerAnglesZYXin interfaceMatrix3dc
-
toImmutable
-