Package ke.ric.renderer.api
Record Class ResolvedMaterial
java.lang.Object
java.lang.Record
ke.ric.renderer.api.ResolvedMaterial
- Record Components:
texture- non-null immutable RGBA8 source texturealphaMode- non-null source-alpha interpretationdoubleSided- whether both sides of triangles are rendered
public record ResolvedMaterial(ResolvedTexture texture, ResolvedMaterial.AlphaMode alphaMode, boolean doubleSided)
extends Record
Exact texture and alpha behavior for a resolved mesh; textures are immutable evidence, not live resource lookups.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumHow the renderer interprets source alpha for the material. -
Constructor Summary
ConstructorsConstructorDescriptionResolvedMaterial(ResolvedTexture texture, ResolvedMaterial.AlphaMode alphaMode, boolean doubleSided) Creates an instance of aResolvedMaterialrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thealphaModerecord component.booleanReturns the value of thedoubleSidedrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.texture()Returns the value of thetexturerecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ResolvedMaterial
public ResolvedMaterial(ResolvedTexture texture, ResolvedMaterial.AlphaMode alphaMode, boolean doubleSided) Creates an instance of aResolvedMaterialrecord class.- Parameters:
texture- the value for thetexturerecord componentalphaMode- the value for thealphaModerecord componentdoubleSided- the value for thedoubleSidedrecord component
-
-
Method Details
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
texture
Returns the value of thetexturerecord component.- Returns:
- the value of the
texturerecord component
-
alphaMode
Returns the value of thealphaModerecord component.- Returns:
- the value of the
alphaModerecord component
-
doubleSided
public boolean doubleSided()Returns the value of thedoubleSidedrecord component.- Returns:
- the value of the
doubleSidedrecord component
-