Package limn.render3d.gltf
Record Class GltfModel.MaterialDef
java.lang.Object
java.lang.Record
limn.render3d.gltf.GltfModel.MaterialDef
- Enclosing class:
GltfModel
public static record GltfModel.MaterialDef(Vec4 baseColor, float metallic, float roughness, Vec3 emissive, int baseColorTexture, String name)
extends Record
Metallic-roughness material; texture fields index
GltfModel.textures() (-1 = none).-
Constructor Summary
ConstructorsConstructorDescriptionMaterialDef(Vec4 baseColor, float metallic, float roughness, Vec3 emissive, int baseColorTexture, String name) Creates an instance of aMaterialDefrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebaseColorrecord component.intReturns the value of thebaseColorTexturerecord component.emissive()Returns the value of theemissiverecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.floatmetallic()Returns the value of themetallicrecord component.name()Returns the value of thenamerecord component.floatReturns the value of theroughnessrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
MaterialDef
public MaterialDef(Vec4 baseColor, float metallic, float roughness, Vec3 emissive, int baseColorTexture, String name) Creates an instance of aMaterialDefrecord class.- Parameters:
baseColor- the value for thebaseColorrecord componentmetallic- the value for themetallicrecord componentroughness- the value for theroughnessrecord componentemissive- the value for theemissiverecord componentbaseColorTexture- the value for thebaseColorTexturerecord componentname- the value for thenamerecord 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 '=='. -
baseColor
Returns the value of thebaseColorrecord component.- Returns:
- the value of the
baseColorrecord component
-
metallic
public float metallic()Returns the value of themetallicrecord component.- Returns:
- the value of the
metallicrecord component
-
roughness
public float roughness()Returns the value of theroughnessrecord component.- Returns:
- the value of the
roughnessrecord component
-
emissive
Returns the value of theemissiverecord component.- Returns:
- the value of the
emissiverecord component
-
baseColorTexture
public int baseColorTexture()Returns the value of thebaseColorTexturerecord component.- Returns:
- the value of the
baseColorTexturerecord component
-
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-