Record Class WorldModel
java.lang.Object
java.lang.Record
com.render.api.world.WorldModel
Immutable multi-part model suitable for cached retained and instanced rendering.
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionWorldModel(List<WorldModel.Part> parts, WorldBounds bounds) Creates an instance of aWorldModelrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbounds()Returns the value of theboundsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static WorldModelof(WorldMesh mesh, WorldMaterial material) parts()Returns the value of thepartsrecord component.final StringtoString()Returns a string representation of this record class.long
-
Constructor Details
-
WorldModel
Creates an instance of aWorldModelrecord class.- Parameters:
parts- the value for thepartsrecord componentbounds- the value for theboundsrecord component
-
-
Method Details
-
of
-
triangleCount
public long triangleCount() -
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). -
parts
Returns the value of thepartsrecord component.- Returns:
- the value of the
partsrecord component
-
bounds
Returns the value of theboundsrecord component.- Returns:
- the value of the
boundsrecord component
-