Record Class Mat4
java.lang.Object
java.lang.Record
dev.engine.core.math.Mat4
public record Mat4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33)
extends Record
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMat4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) Creates an instance of aMat4record class. -
Method Summary
Modifier and TypeMethodDescriptionfloatfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.inverse()static Mat4floatm00()Returns the value of them00record component.floatm01()Returns the value of them01record component.floatm02()Returns the value of them02record component.floatm03()Returns the value of them03record component.floatm10()Returns the value of them10record component.floatm11()Returns the value of them11record component.floatm12()Returns the value of them12record component.floatm13()Returns the value of them13record component.floatm20()Returns the value of them20record component.floatm21()Returns the value of them21record component.floatm22()Returns the value of them22record component.floatm23()Returns the value of them23record component.floatm30()Returns the value of them30record component.floatm31()Returns the value of them31record component.floatm32()Returns the value of them32record component.floatm33()Returns the value of them33record component.static Mat4ortho(float left, float right, float bottom, float top, float near, float far) static Mat4perspective(float fovY, float aspect, float near, float far) static Mat4rotationX(float radians) static Mat4rotationY(float radians) static Mat4rotationZ(float radians) static Mat4scaling(float sx, float sy, float sz) toMat3()Extracts the upper-left 3x3 submatrix.final StringtoString()Returns a string representation of this record class.static Mat4translation(float tx, float ty, float tz) static Mat4translation(Vec3 t) voidwriteGpu(NativeMemory mem, long offset) Writes this matrix to aNativeMemoryin column-major order (GPU layout).
-
Field Details
-
IDENTITY
-
-
Constructor Details
-
Mat4
public Mat4(float m00, float m01, float m02, float m03, float m10, float m11, float m12, float m13, float m20, float m21, float m22, float m23, float m30, float m31, float m32, float m33) Creates an instance of aMat4record class.- Parameters:
m00- the value for them00record componentm01- the value for them01record componentm02- the value for them02record componentm03- the value for them03record componentm10- the value for them10record componentm11- the value for them11record componentm12- the value for them12record componentm13- the value for them13record componentm20- the value for them20record componentm21- the value for them21record componentm22- the value for them22record componentm23- the value for them23record componentm30- the value for them30record componentm31- the value for them31record componentm32- the value for them32record componentm33- the value for them33record component
-
-
Method Details
-
translation
-
translation
-
scaling
-
rotationX
-
rotationY
-
rotationZ
-
perspective
-
ortho
-
lookAt
-
mul
-
transform
-
transpose
-
determinant
public float determinant() -
inverse
-
toMat3
Extracts the upper-left 3x3 submatrix. -
writeGpu
Writes this matrix to aNativeMemoryin column-major order (GPU layout). GPU APIs (OpenGL, Vulkan) expect columns stored contiguously. -
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with thecomparemethod from their corresponding wrapper classes. -
m00
public float m00()Returns the value of them00record component.- Returns:
- the value of the
m00record component
-
m01
public float m01()Returns the value of them01record component.- Returns:
- the value of the
m01record component
-
m02
public float m02()Returns the value of them02record component.- Returns:
- the value of the
m02record component
-
m03
public float m03()Returns the value of them03record component.- Returns:
- the value of the
m03record component
-
m10
public float m10()Returns the value of them10record component.- Returns:
- the value of the
m10record component
-
m11
public float m11()Returns the value of them11record component.- Returns:
- the value of the
m11record component
-
m12
public float m12()Returns the value of them12record component.- Returns:
- the value of the
m12record component
-
m13
public float m13()Returns the value of them13record component.- Returns:
- the value of the
m13record component
-
m20
public float m20()Returns the value of them20record component.- Returns:
- the value of the
m20record component
-
m21
public float m21()Returns the value of them21record component.- Returns:
- the value of the
m21record component
-
m22
public float m22()Returns the value of them22record component.- Returns:
- the value of the
m22record component
-
m23
public float m23()Returns the value of them23record component.- Returns:
- the value of the
m23record component
-
m30
public float m30()Returns the value of them30record component.- Returns:
- the value of the
m30record component
-
m31
public float m31()Returns the value of them31record component.- Returns:
- the value of the
m31record component
-
m32
public float m32()Returns the value of them32record component.- Returns:
- the value of the
m32record component
-
m33
public float m33()Returns the value of them33record component.- Returns:
- the value of the
m33record component
-