Record Class GuiMeshGradient.Patch

java.lang.Object
java.lang.Record
com.render.api.gui.paint.GuiMeshGradient.Patch
Enclosing class:
GuiMeshGradient

public static record GuiMeshGradient.Patch(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, List<GuiMeshGradient.Point> controls) extends Record
  • Constructor Details

    • Patch

      public Patch(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, List<GuiMeshGradient.Point> controls)
      Creates an instance of a Patch record class.
      Parameters:
      topLeft - the value for the topLeft record component
      topRight - the value for the topRight record component
      bottomRight - the value for the bottomRight record component
      bottomLeft - the value for the bottomLeft record component
      controls - the value for the controls record component
  • Method Details

    • colors

      public static GuiMeshGradient.Patch colors(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft)
    • controlled

      public static GuiMeshGradient.Patch controlled(RenderColor topLeft, RenderColor topRight, RenderColor bottomRight, RenderColor bottomLeft, GuiMeshGradient.Point topFirst, GuiMeshGradient.Point topSecond, GuiMeshGradient.Point rightFirst, GuiMeshGradient.Point rightSecond, GuiMeshGradient.Point bottomFirst, GuiMeshGradient.Point bottomSecond, GuiMeshGradient.Point leftFirst, GuiMeshGradient.Point leftSecond)
      Creates a Coons patch with explicit normalized cubic boundary controls.
    • curved

      public boolean curved()
    • point

      public GuiMeshGradient.Point point(float u, float v)
      Samples the normalized Coons-patch geometry.
      Parameters:
      u - horizontal patch parameter
      v - vertical patch parameter
      Returns:
      normalized patch coordinate
    • 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 Objects::equals(Object,Object).
      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.
    • topLeft

      public RenderColor topLeft()
      Returns the value of the topLeft record component.
      Returns:
      the value of the topLeft record component
    • topRight

      public RenderColor topRight()
      Returns the value of the topRight record component.
      Returns:
      the value of the topRight record component
    • bottomRight

      public RenderColor bottomRight()
      Returns the value of the bottomRight record component.
      Returns:
      the value of the bottomRight record component
    • bottomLeft

      public RenderColor bottomLeft()
      Returns the value of the bottomLeft record component.
      Returns:
      the value of the bottomLeft record component
    • controls

      public List<GuiMeshGradient.Point> controls()
      Returns the value of the controls record component.
      Returns:
      the value of the controls record component