Record Class GuiTransform.Projective

java.lang.Object
java.lang.Record
com.render.api.gui.effects.GuiTransform.Projective
Record Components:
h00 - first-row X coefficient
h01 - first-row Y coefficient
h02 - first-row translation coefficient
h10 - second-row X coefficient
h11 - second-row Y coefficient
h12 - second-row translation coefficient
h20 - homogeneous X coefficient
h21 - homogeneous Y coefficient
h22 - homogeneous scale coefficient
Enclosing class:
GuiTransform

public static record GuiTransform.Projective(float h00, float h01, float h02, float h10, float h11, float h12, float h20, float h21, float h22) extends Record
Invertible 2D homography used for perspective paint and hit testing. Coordinates are divided by h20*x + h21*y + h22.
  • Constructor Details

    • Projective

      public Projective(float h00, float h01, float h02, float h10, float h11, float h12, float h20, float h21, float h22)
      Creates an instance of a Projective record class.
      Parameters:
      h00 - the value for the h00 record component
      h01 - the value for the h01 record component
      h02 - the value for the h02 record component
      h10 - the value for the h10 record component
      h11 - the value for the h11 record component
      h12 - the value for the h12 record component
      h20 - the value for the h20 record component
      h21 - the value for the h21 record component
      h22 - the value for the h22 record component
  • Method Details

    • transform

      public GuiTransform.Point transform(float x, float y)
    • inverse

      public GuiTransform.Point inverse(float x, float y)
    • asAffine

      public Optional<GuiTransform.Affine> asAffine()
    • multiply

    • determinant

      public float determinant()
    • finite

      public boolean finite()
    • 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.
    • h00

      public float h00()
      Returns the value of the h00 record component.
      Returns:
      the value of the h00 record component
    • h01

      public float h01()
      Returns the value of the h01 record component.
      Returns:
      the value of the h01 record component
    • h02

      public float h02()
      Returns the value of the h02 record component.
      Returns:
      the value of the h02 record component
    • h10

      public float h10()
      Returns the value of the h10 record component.
      Returns:
      the value of the h10 record component
    • h11

      public float h11()
      Returns the value of the h11 record component.
      Returns:
      the value of the h11 record component
    • h12

      public float h12()
      Returns the value of the h12 record component.
      Returns:
      the value of the h12 record component
    • h20

      public float h20()
      Returns the value of the h20 record component.
      Returns:
      the value of the h20 record component
    • h21

      public float h21()
      Returns the value of the h21 record component.
      Returns:
      the value of the h21 record component
    • h22

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