Package kr.toxicity.model.api.data.raw
Record Class ModelElement.Cube
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelElement.Cube
- Record Components:
name- the name of the cubeuuid- the UUID of the cubefrom- the starting coordinate (min corner)to- the ending coordinate (max corner)inflate- the inflation value (size increase)rotation- the rotation of the cubeorigin- the pivot point (origin) of the cubefaces- the UV mapping for the faceslightEmission- the light emission level (0-15)_visibility- the visibility state (null means visible)
- All Implemented Interfaces:
ModelElement
- Enclosing interface:
ModelElement
public static record ModelElement.Cube(@NotNull String name, @NotNull String uuid, @Nullable Float3 from, @Nullable Float3 to, float inflate, @Nullable Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, int lightEmission, @Nullable Boolean _visibility)
extends Record
implements ModelElement
Represents a standard cube element.
- Since:
- 1.15.2
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.data.raw.ModelElement
ModelElement.Camera, ModelElement.Cube, ModelElement.Locator, ModelElement.NullObject, ModelElement.Unsupported -
Field Summary
Fields inherited from interface kr.toxicity.model.api.data.raw.ModelElement
PARSER -
Constructor Summary
ConstructorsConstructorDescriptionCube(@NotNull String name, @NotNull String uuid, @Nullable Float3 from, @Nullable Float3 to, float inflate, @Nullable Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, int lightEmission, @Nullable Boolean _visibility) Creates an instance of aCuberecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of the_visibilityrecord component.final booleanIndicates whether some other object is "equal to" this one.@Nullable ModelFacefaces()Returns the value of thefacesrecord component.@NotNull Float3from()Returns the starting coordinate (min corner).final inthashCode()Returns a hash code value for this object.floatinflate()Returns the value of theinflaterecord component.intReturns the light emission level of the cube.@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Float3origin()Returns the value of theoriginrecord component.@NotNull Float3rotation()Returns the rotation of the cube.@NotNull Float3to()Returns the ending coordinate (max corner).@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 (e.g., "cube", "locator").@NotNull Stringuuid()Returns the value of theuuidrecord component.booleanChecks if the cube is visible.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface kr.toxicity.model.api.data.raw.ModelElement
isSupported
-
Constructor Details
-
Cube
public Cube(@NotNull @NotNull String name, @NotNull @NotNull String uuid, @Nullable @Nullable Float3 from, @Nullable @Nullable Float3 to, float inflate, @Nullable @Nullable Float3 rotation, @NotNull @NotNull Float3 origin, @Nullable @Nullable ModelFace faces, int lightEmission, @Nullable @Nullable Boolean _visibility) Creates an instance of aCuberecord class.- Parameters:
name- the value for thenamerecord componentuuid- the value for theuuidrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord componentinflate- the value for theinflaterecord componentrotation- the value for therotationrecord componentorigin- the value for theoriginrecord componentfaces- the value for thefacesrecord componentlightEmission- the value for thelightEmissionrecord component_visibility- the value for the_visibilityrecord component
-
-
Method Details
-
type
Description copied from interface:ModelElementReturns the type identifier of this element (e.g., "cube", "locator").- Specified by:
typein interfaceModelElement- Returns:
- the type string
-
from
Returns the starting coordinate (min corner).- Returns:
- the from vector, or
Float3.ZEROif not specified - Since:
- 1.15.2
-
to
Returns the ending coordinate (max corner).- Returns:
- the to vector, or
Float3.ZEROif not specified - Since:
- 1.15.2
-
visibility
public boolean visibility()Checks if the cube is visible.- Returns:
- true if visible, false otherwise
- Since:
- 1.15.2
-
rotation
Returns the rotation of the cube.- Returns:
- the rotation, or
Float3.ZEROif not specified - Since:
- 1.15.2
-
lightEmission
public int lightEmission()Returns the light emission level of the cube.- Returns:
- the light emission level (0-15)
- Since:
- 2.1.0
-
toBlueprint
Description copied from interface:ModelElementConverts this raw element into a processedBlueprintElement.- Specified by:
toBlueprintin interfaceModelElement- Returns:
- the blueprint element
-
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 '=='. -
name
Returns the value of thenamerecord component.- Returns:
- the value of the
namerecord component
-
uuid
Returns the value of theuuidrecord component.- Specified by:
uuidin interfaceModelElement- Returns:
- the value of the
uuidrecord component
-
inflate
public float inflate()Returns the value of theinflaterecord component.- Returns:
- the value of the
inflaterecord component
-
origin
Returns the value of theoriginrecord component.- Returns:
- the value of the
originrecord component
-
faces
Returns the value of thefacesrecord component.- Returns:
- the value of the
facesrecord component
-
_visibility
Returns the value of the_visibilityrecord component.- Returns:
- the value of the
_visibilityrecord component
-