Record Class BlueprintElement.Mesh
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.BlueprintElement.Mesh
- Record Components:
origin- the pivot point of the meshrotation- the rotation of the meshfaces- the list of faces forming the meshvisibility- whether the mesh is visible
- All Implemented Interfaces:
BlueprintElement
- Enclosing interface:
BlueprintElement
public static record BlueprintElement.Mesh(@NotNull Float3 origin, @NotNull Float3 rotation, @NotNull List<BlueprintElement.Mesh.Face> faces, boolean visibility)
extends Record
implements BlueprintElement
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.static final recordRepresents a single point (vertex) in a mesh face.Nested classes/interfaces inherited from interface BlueprintElement
BlueprintElement.Bone, BlueprintElement.Camera, BlueprintElement.Cube, BlueprintElement.Group, BlueprintElement.Locator, BlueprintElement.Mesh, BlueprintElement.NullObject -
Field Summary
Fields inherited from interface BlueprintElement
MESH_PIXEL, MESH_TRIANGLE_DUPLEX, MESH_TRIANGLE_SINGLE -
Constructor Summary
ConstructorsConstructorDescriptionMesh(@NotNull Float3 origin, @NotNull Float3 rotation, @NotNull List<BlueprintElement.Mesh.Face> faces, boolean visibility) Creates an instance of aMeshrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@NotNull List<BlueprintElement.Mesh.Face> faces()Returns the value of thefacesrecord component.final inthashCode()Returns a hash code value for this object.@NotNull Float3origin()Returns the value of theoriginrecord component.@NotNull Float3rotation()Returns the value of therotationrecord component.@NotNull @Unmodifiable List<io.github.toxicity188.javamesh.MeshShape> Converts this mesh into a list ofMeshShapefor rendering.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thevisibilityrecord component.
-
Constructor Details
-
Mesh
public Mesh(@NotNull @NotNull Float3 origin, @NotNull @NotNull Float3 rotation, @NotNull @NotNull List<BlueprintElement.Mesh.Face> faces, boolean visibility) Creates an instance of aMeshrecord class.- Parameters:
origin- the value for theoriginrecord componentrotation- the value for therotationrecord componentfaces- the value for thefacesrecord componentvisibility- the value for thevisibilityrecord component
-
-
Method Details
-
toShape
@NotNull public @NotNull @Unmodifiable List<io.github.toxicity188.javamesh.MeshShape> toShape(@NotNull @NotNull Float3 parentOrigin) Converts this mesh into a list ofMeshShapefor rendering.- Parameters:
parentOrigin- the origin of the parent bone- Returns:
- an unmodifiable list of mesh shapes
- Since:
- 3.0.0
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
origin
-
rotation
Returns the value of therotationrecord component.- Specified by:
rotationin interfaceBlueprintElement- Returns:
- the value of the
rotationrecord component
-
faces
-
visibility
public boolean visibility()Returns the value of thevisibilityrecord component.- Specified by:
visibilityin interfaceBlueprintElement- Returns:
- the value of the
visibilityrecord component
-