Record Class Mat3

java.lang.Object
java.lang.Record
dev.engine.core.math.Mat3

public record Mat3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Mat3
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Mat3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
    Creates an instance of a Mat3 record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    float
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
     
    float
    m00()
    Returns the value of the m00 record component.
    float
    m01()
    Returns the value of the m01 record component.
    float
    m02()
    Returns the value of the m02 record component.
    float
    m10()
    Returns the value of the m10 record component.
    float
    m11()
    Returns the value of the m11 record component.
    float
    m12()
    Returns the value of the m12 record component.
    float
    m20()
    Returns the value of the m20 record component.
    float
    m21()
    Returns the value of the m21 record component.
    float
    m22()
    Returns the value of the m22 record component.
    mul(Mat3 o)
     
    Computes the normal matrix (inverse transpose) from this 3x3 matrix.
    scale(float s)
     
    final String
    Returns a string representation of this record class.
     
     

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • IDENTITY

      public static final Mat3 IDENTITY
  • Constructor Details

    • Mat3

      public Mat3(float m00, float m01, float m02, float m10, float m11, float m12, float m20, float m21, float m22)
      Creates an instance of a Mat3 record class.
      Parameters:
      m00 - the value for the m00 record component
      m01 - the value for the m01 record component
      m02 - the value for the m02 record component
      m10 - the value for the m10 record component
      m11 - the value for the m11 record component
      m12 - the value for the m12 record component
      m20 - the value for the m20 record component
      m21 - the value for the m21 record component
      m22 - the value for the m22 record component
  • Method Details

    • mul

      public Mat3 mul(Mat3 o)
    • transform

      public Vec3 transform(Vec3 v)
    • transpose

      public Mat3 transpose()
    • determinant

      public float determinant()
    • inverse

      public Mat3 inverse()
    • normalMatrix

      public Mat3 normalMatrix()
      Computes the normal matrix (inverse transpose) from this 3x3 matrix.
    • scale

      public Mat3 scale(float s)
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • m00

      public float m00()
      Returns the value of the m00 record component.
      Returns:
      the value of the m00 record component
    • m01

      public float m01()
      Returns the value of the m01 record component.
      Returns:
      the value of the m01 record component
    • m02

      public float m02()
      Returns the value of the m02 record component.
      Returns:
      the value of the m02 record component
    • m10

      public float m10()
      Returns the value of the m10 record component.
      Returns:
      the value of the m10 record component
    • m11

      public float m11()
      Returns the value of the m11 record component.
      Returns:
      the value of the m11 record component
    • m12

      public float m12()
      Returns the value of the m12 record component.
      Returns:
      the value of the m12 record component
    • m20

      public float m20()
      Returns the value of the m20 record component.
      Returns:
      the value of the m20 record component
    • m21

      public float m21()
      Returns the value of the m21 record component.
      Returns:
      the value of the m21 record component
    • m22

      public float m22()
      Returns the value of the m22 record component.
      Returns:
      the value of the m22 record component