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 Matrix3d
add(Matrix3dc other)
Matrix3d
add(Matrix3dc other, Matrix3d dest)
double
determinant()
boolean
equals(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.ByteBuffer
get(int index, java.nio.ByteBuffer buffer)
java.nio.DoubleBuffer
get(int index, java.nio.DoubleBuffer buffer)
java.nio.FloatBuffer
get(int index, java.nio.FloatBuffer buffer)
java.nio.ByteBuffer
get(java.nio.ByteBuffer buffer)
java.nio.DoubleBuffer
get(java.nio.DoubleBuffer buffer)
java.nio.FloatBuffer
get(java.nio.FloatBuffer buffer)
Matrix3d
get(Matrix3d dest)
Vector3d
getColumn(int column, Vector3d dest)
Vector3d
getEulerAnglesZYX(Vector3d dest)
java.nio.ByteBuffer
getFloats(int index, java.nio.ByteBuffer buffer)
java.nio.ByteBuffer
getFloats(java.nio.ByteBuffer buffer)
Quaterniond
getNormalizedRotation(Quaterniond dest)
Quaternionf
getNormalizedRotation(Quaternionf dest)
AxisAngle4f
getRotation(AxisAngle4f dest)
Vector3d
getRow(int row, Vector3d dest)
Vector3d
getScale(Vector3d dest)
Quaterniond
getUnnormalizedRotation(Quaterniond dest)
Quaternionf
getUnnormalizedRotation(Quaternionf dest)
int
hashCode()
Matrix3d
identity()
Matrix3d
invert()
Matrix3d
invert(Matrix3d dest)
Matrix3d
lerp(Matrix3dc other, double t)
Matrix3d
lerp(Matrix3dc other, double t, Matrix3d dest)
Matrix3d
lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
Matrix3d
lookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)
Matrix3d
lookAlong(Vector3dc dir, Vector3dc up)
Matrix3d
lookAlong(Vector3dc dir, Vector3dc up, Matrix3d dest)
double
m00()
Matrix3d
m00(double m00)
double
m01()
Matrix3d
m01(double m01)
double
m02()
Matrix3d
m02(double m02)
double
m10()
Matrix3d
m10(double m10)
double
m11()
Matrix3d
m11(double m11)
double
m12()
Matrix3d
m12(double m12)
double
m20()
Matrix3d
m20(double m20)
double
m21()
Matrix3d
m21(double m21)
double
m22()
Matrix3d
m22(double m22)
Matrix3d
mul(Matrix3dc right)
Matrix3d
mul(Matrix3dc right, Matrix3d dest)
Matrix3d
mul(Matrix3fc right)
Matrix3d
mul(Matrix3fc right, Matrix3d dest)
Matrix3d
mulComponentWise(Matrix3dc other)
Matrix3d
mulComponentWise(Matrix3dc other, Matrix3d dest)
Matrix3d
normal()
Matrix3d
normal(Matrix3d dest)
Vector3d
normalizedPositiveX(Vector3d dir)
Vector3d
normalizedPositiveY(Vector3d dir)
Vector3d
normalizedPositiveZ(Vector3d dir)
Vector3d
positiveX(Vector3d dir)
Vector3d
positiveY(Vector3d dir)
Vector3d
positiveZ(Vector3d dir)
void
readExternal(java.io.ObjectInput in)
Matrix3d
rotate(double ang, double x, double y, double z)
Matrix3d
rotate(double ang, double x, double y, double z, Matrix3d dest)
Matrix3d
rotate(double angle, Vector3dc axis)
Matrix3d
rotate(double angle, Vector3dc axis, Matrix3d dest)
Matrix3d
rotate(double angle, Vector3fc axis)
Matrix3d
rotate(double angle, Vector3fc axis, Matrix3d dest)
Matrix3d
rotate(AxisAngle4d axisAngle)
Matrix3d
rotate(AxisAngle4d axisAngle, Matrix3d dest)
Matrix3d
rotate(AxisAngle4f axisAngle)
Matrix3d
rotate(AxisAngle4f axisAngle, Matrix3d dest)
Matrix3d
rotate(Quaterniondc quat)
Matrix3d
rotate(Quaterniondc quat, Matrix3d dest)
Matrix3d
rotate(Quaternionfc quat)
Matrix3d
rotate(Quaternionfc quat, Matrix3d dest)
Matrix3d
rotateLocal(double ang, double x, double y, double z)
Matrix3d
rotateLocal(double ang, double x, double y, double z, Matrix3d dest)
Matrix3d
rotateLocal(Quaterniondc quat)
Matrix3d
rotateLocal(Quaterniondc quat, Matrix3d dest)
Matrix3d
rotateLocal(Quaternionfc quat)
Matrix3d
rotateLocal(Quaternionfc quat, Matrix3d dest)
Matrix3d
rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
Matrix3d
rotateTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ, Matrix3d dest)
Matrix3d
rotateTowards(Vector3dc direction, Vector3dc up)
Matrix3d
rotateTowards(Vector3dc direction, Vector3dc up, Matrix3d dest)
Matrix3d
rotateX(double ang)
Matrix3d
rotateX(double ang, Matrix3d dest)
Matrix3d
rotateXYZ(double angleX, double angleY, double angleZ)
Matrix3d
rotateXYZ(double angleX, double angleY, double angleZ, Matrix3d dest)
Matrix3d
rotateY(double ang)
Matrix3d
rotateY(double ang, Matrix3d dest)
Matrix3d
rotateYXZ(double angleY, double angleX, double angleZ)
Matrix3d
rotateYXZ(double angleY, double angleX, double angleZ, Matrix3d dest)
Matrix3d
rotateYXZ(Vector3d angles)
Matrix3d
rotateZ(double ang)
Matrix3d
rotateZ(double ang, Matrix3d dest)
Matrix3d
rotateZYX(double angleZ, double angleY, double angleX)
Matrix3d
rotateZYX(double angleZ, double angleY, double angleX, Matrix3d dest)
Matrix3d
rotation(double angle, double x, double y, double z)
Matrix3d
rotation(double angle, Vector3dc axis)
Matrix3d
rotation(double angle, Vector3fc axis)
Matrix3d
rotation(AxisAngle4d axisAngle)
Matrix3d
rotation(AxisAngle4f axisAngle)
Matrix3d
rotation(Quaterniondc quat)
Matrix3d
rotation(Quaternionfc quat)
Matrix3d
rotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
Matrix3d
rotationTowards(Vector3dc dir, Vector3dc up)
Matrix3d
rotationX(double ang)
Matrix3d
rotationXYZ(double angleX, double angleY, double angleZ)
Matrix3d
rotationY(double ang)
Matrix3d
rotationYXZ(double angleY, double angleX, double angleZ)
Matrix3d
rotationZ(double ang)
Matrix3d
rotationZYX(double angleZ, double angleY, double angleX)
Matrix3d
scale(double xyz)
Matrix3d
scale(double x, double y, double z)
Matrix3d
scale(double x, double y, double z, Matrix3d dest)
Matrix3d
scale(double xyz, Matrix3d dest)
Matrix3d
scale(Vector3dc xyz)
Matrix3d
scale(Vector3dc xyz, Matrix3d dest)
Matrix3d
scaleLocal(double x, double y, double z)
Matrix3d
scaleLocal(double x, double y, double z, Matrix3d dest)
Matrix3d
scaling(double factor)
Matrix3d
scaling(double x, double y, double z)
Matrix3d
scaling(Vector3dc xyz)
Matrix3d
set(double[] m)
Matrix3d
set(double m00, double m01, double m02, double m10, double m11, double m12, double m20, double m21, double m22)
Matrix3d
set(float[] m)
Matrix3d
set(java.nio.ByteBuffer buffer)
Matrix3d
set(java.nio.DoubleBuffer buffer)
Matrix3d
set(java.nio.FloatBuffer buffer)
Matrix3d
set(AxisAngle4d axisAngle)
Matrix3d
set(AxisAngle4f axisAngle)
Matrix3d
set(Matrix3dc m)
Matrix3d
set(Matrix3fc m)
Matrix3d
set(Matrix4dc mat)
Matrix3d
set(Matrix4fc mat)
Matrix3d
set(Quaterniondc q)
Matrix3d
set(Quaternionfc q)
Matrix3d
set(Vector3dc col0, Vector3dc col1, Vector3dc col2)
Matrix3d
setColumn(int column, Vector3dc src)
Matrix3d
setFloats(java.nio.ByteBuffer buffer)
Matrix3d
setLookAlong(double dirX, double dirY, double dirZ, double upX, double upY, double upZ)
Matrix3d
setLookAlong(Vector3dc dir, Vector3dc up)
Matrix3d
setRow(int row, Vector3dc src)
Matrix3d
setSkewSymmetric(double a, double b, double c)
Matrix3d
sub(Matrix3dc subtrahend)
Matrix3d
sub(Matrix3dc subtrahend, Matrix3d dest)
Matrix3d
swap(Matrix3d other)
Matrix3dc
toImmutable()
java.lang.String
toString()
java.lang.String
toString(java.text.NumberFormat formatter)
Vector3d
transform(double x, double y, double z, Vector3d dest)
Vector3d
transform(Vector3d v)
Vector3d
transform(Vector3dc v, Vector3d dest)
Matrix3d
transpose()
Matrix3d
transpose(Matrix3d dest)
void
writeExternal(java.io.ObjectOutput out)
Matrix3d
zero()
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:
determinant
in interfaceMatrix3dc
-
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
-
getRotation
- Specified by:
getRotation
in interfaceMatrix3dc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3dc
-
getNormalizedRotation
- Specified by:
getNormalizedRotation
in interfaceMatrix3dc
-
getUnnormalizedRotation
- Specified by:
getUnnormalizedRotation
in interfaceMatrix3dc
-
getNormalizedRotation
- Specified by:
getNormalizedRotation
in 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:
scaleLocal
in 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:
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
-
rotateZYX
-
rotateZYX
-
rotateYXZ
-
rotateYXZ
-
rotateYXZ
-
rotate
-
rotate
-
rotateLocal
- Specified by:
rotateLocal
in interfaceMatrix3dc
-
rotateLocal
-
rotateLocal
- Specified by:
rotateLocal
in interfaceMatrix3dc
-
rotateLocal
-
rotateLocal
- Specified by:
rotateLocal
in 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:
normalizedPositiveZ
in interfaceMatrix3dc
-
positiveX
-
normalizedPositiveX
- Specified by:
normalizedPositiveX
in interfaceMatrix3dc
-
positiveY
-
normalizedPositiveY
- Specified by:
normalizedPositiveY
in interfaceMatrix3dc
-
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 interfaceMatrix3dc
-
setSkewSymmetric
-
lerp
-
lerp
-
rotateTowards
- Specified by:
rotateTowards
in 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:
rotateTowards
in interfaceMatrix3dc
-
rotationTowards
-
rotationTowards
public Matrix3d rotationTowards(double dirX, double dirY, double dirZ, double upX, double upY, double upZ) -
getEulerAnglesZYX
- Specified by:
getEulerAnglesZYX
in interfaceMatrix3dc
-
toImmutable
-