Record Class ScreenEffectDefinition.UniformValue

java.lang.Object
java.lang.Record
net.ixdarklord.coolcatcanvas.api.client.effect.ScreenEffectDefinition.UniformValue
Record Components:
components - the value's floats, ScreenEffectDefinition.UniformType.components() of them; a matrix column by column
Enclosing class:
ScreenEffectDefinition

public static record ScreenEffectDefinition.UniformValue(ScreenEffectDefinition.UniformType type, float[] components) extends Record
A uniform's value.
  • Constructor Details

    • UniformValue

      public UniformValue(ScreenEffectDefinition.UniformType type, float[] components)
      Creates an instance of a UniformValue record class.
      Parameters:
      type - the value for the type record component
      components - the value for the components record component
  • Method Details

    • components

      public float[] components()
      Returns the value of the components record component.
      Returns:
      the value of the components record component
    • equals

      public boolean equals(Object other)
      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:
      other - the object with which to compare
      Returns:
      true if this object is the same as the other argument; false otherwise.
    • hashCode

      public 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
    • toString

      public 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
    • type

      Returns the value of the type record component.
      Returns:
      the value of the type record component