Record Class ModelElement.Mesh
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelElement.Mesh
- Record Components:
uuid- the UUID of the meshorigin- the pivot point (origin) of the meshrotation- the rotation of the meshvertices- a map of vertex identifiers to their 3D positionsfaces- a map of face identifiers to their face data_visibility- the visibility state (null means visible)
- All Implemented Interfaces:
ModelElement
- Enclosing interface:
ModelElement
public static record ModelElement.Mesh(@NotNull String uuid, @Nullable Float3 origin, @Nullable Float3 rotation, @NotNull Map<String,Float3> vertices, @NotNull Map<String, ModelElement.Mesh.Face> faces, @Nullable Boolean _visibility)
extends Record
implements ModelElement
Represents a mesh element, allowing for complex geometry beyond simple cubes.
- Since:
- 3.0.0
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordRepresents a single face of a mesh.Nested classes/interfaces inherited from interface ModelElement
ModelElement.Camera, ModelElement.Cube, ModelElement.Locator, ModelElement.Mesh, ModelElement.NullObject, ModelElement.Unsupported -
Field Summary
Fields inherited from interface ModelElement
CAMERA, CUBE, LOCATOR, MESH, NULL_OBJECT, PARSER -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of the_visibilityrecord component.final booleanIndicates whether some other object is "equal to" this one.@NotNull Map<String, ModelElement.Mesh.Face> faces()Returns the value of thefacesrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Float3origin()Returns the pivot point (origin) of the mesh.@NotNull Float3rotation()Returns the rotation of the mesh.@NotNull BlueprintElementConverts this raw element into a processedBlueprintElement.final StringtoString()Returns a string representation of this record class.@NotNull Stringtype()Returns the type identifier of this element.@NotNull Stringuuid()Returns the value of theuuidrecord component.vertices()Returns the value of theverticesrecord component.booleanMethods inherited from interface ModelElement
isSupported
-
Constructor Details
-
Mesh
public Mesh(@NotNull @NotNull String uuid, @Nullable @Nullable Float3 origin, @Nullable @Nullable Float3 rotation, @NotNull @NotNull Map<String, Float3> vertices, @NotNull @NotNull Map<String, ModelElement.Mesh.Face> faces, @Nullable @Nullable Boolean _visibility) Creates an instance of aMeshrecord class.- Parameters:
uuid- the value for theuuidrecord componentorigin- the value for theoriginrecord componentrotation- the value for therotationrecord componentvertices- the value for theverticesrecord componentfaces- the value for thefacesrecord component_visibility- the value for the_visibilityrecord component
-
-
Method Details
-
origin
Returns the pivot point (origin) of the mesh.- Returns:
- the origin vector, or
Float3.ZEROif not specified - Since:
- 3.0.0
-
rotation
Returns the rotation of the mesh.- Returns:
- the rotation vector, or
Float3.ZEROif not specified - Since:
- 3.0.0
-
type
Returns the type identifier of this element.- Specified by:
typein interfaceModelElement- Returns:
ModelElement.MESH- Since:
- 3.0.0
-
visibility
public boolean visibility() -
toBlueprint
Description copied from interface:ModelElementConverts this raw element into a processedBlueprintElement.- Specified by:
toBlueprintin interfaceModelElement- Returns:
- the blueprint element
-
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). -
uuid
Returns the value of theuuidrecord component.- Specified by:
uuidin interfaceModelElement- Returns:
- the value of the
uuidrecord component
-
vertices
-
faces
-
_visibility
Returns the value of the_visibilityrecord component.- Returns:
- the value of the
_visibilityrecord component
-