Record Class Model
java.lang.Object
java.lang.Record
dev.engine.core.asset.Model
public record Model(List<Model.SubMesh> meshes, List<MaterialData> materials, List<Model.Node> nodes)
extends Record
A loaded 3D model with multiple meshes, materials, and hierarchy.
Loaded by Assimp (glTF, FBX, OBJ, etc).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordA node in the model's scene hierarchy.static final recordA mesh + material index pair. -
Constructor Summary
ConstructorsConstructorDescriptionModel(List<Model.SubMesh> meshes, List<MaterialData> materials, List<Model.Node> nodes) Creates an instance of aModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of thematerialsrecord component.meshes()Returns the value of themeshesrecord component.nodes()Returns the value of thenodesrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Model
Creates an instance of aModelrecord class.- Parameters:
meshes- the value for themeshesrecord componentmaterials- the value for thematerialsrecord componentnodes- the value for thenodesrecord component
-
-
Method Details
-
toString
-
hashCode
-
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). -
meshes
Returns the value of themeshesrecord component.- Returns:
- the value of the
meshesrecord component
-
materials
Returns the value of thematerialsrecord component.- Returns:
- the value of the
materialsrecord component
-
nodes
Returns the value of thenodesrecord component.- Returns:
- the value of the
nodesrecord component
-