Package limn.render3d.shader
Record Class Expr.Lit
java.lang.Object
java.lang.Record
limn.render3d.shader.Expr.Lit
- All Implemented Interfaces:
Expr
- Enclosing interface:
Expr
A numeric literal, scalar or vector by value count. It keeps a copy of the values it is
given and hands out a copy, and two literals of the same values are equal.
-
Nested Class Summary
Nested classes/interfaces inherited from interface limn.render3d.shader.Expr
Expr.Binary, Expr.Call, Expr.Construct, Expr.Lit, Expr.Loop, Expr.Op, Expr.Raw, Expr.Ref, Expr.Sample, Expr.Swizzle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanIndicates whether some other object is "equal to" this one.inthashCode()Returns a hash code value for this object.static Expr.Litof(float... values) A literal of one to four components, matching the count given.toString()Returns a string representation of this record class.type()float[]values()A copy of the values, so the literal stays what it was built as.
-
Constructor Details
-
Lit
public Lit(float[] values) Creates an instance of aLitrecord class.- Parameters:
values- the value for thevaluesrecord component
-
-
Method Details
-
of
A literal of one to four components, matching the count given. -
type
-
values
public float[] values()A copy of the values, so the literal stays what it was built as. -
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 withObjects::equals(Object,Object). -
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. -
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.
-