Record Class BlueprintElement.Cube
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.blueprint.BlueprintElement.Cube
- Record Components:
name- namefrom- min-positionto- max-positioninflate- inflaterotation- rotationorigin- originfaces- uvvisibility- visibility
- All Implemented Interfaces:
BlueprintElement
- Enclosing interface:
BlueprintElement
public static record BlueprintElement.Cube(@NotNull String name, @NotNull Float3 from, @NotNull Float3 to, float inflate, @NotNull Float3 rotation, @NotNull Float3 origin, @Nullable ModelFace faces, boolean visibility)
extends Record
implements BlueprintElement
Blueprint cube.
-
Nested Class Summary
Nested classes/interfaces inherited from interface kr.toxicity.model.api.data.blueprint.BlueprintElement
BlueprintElement.BlueprintCamera, BlueprintElement.Bone, BlueprintElement.Cube, BlueprintElement.Group, BlueprintElement.Locator, BlueprintElement.NullObject -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.@Nullable ModelFacefaces()Returns the value of thefacesrecord component.@NotNull Float3from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.booleanChecks this model has texturefloatinflate()Returns the value of theinflaterecord component.floatGets max length of this cube@NotNull Stringname()Returns the value of thenamerecord component.@NotNull Float3origin()Returns the value of theoriginrecord component.@NotNull Float3rotation()Returns the value of therotationrecord component.@NotNull Float3to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.booleanReturns the value of thevisibilityrecord component.
-
Constructor Details
-
Cube
public Cube(@NotNull @NotNull String name, @NotNull @NotNull Float3 from, @NotNull @NotNull Float3 to, float inflate, @NotNull @NotNull Float3 rotation, @NotNull @NotNull Float3 origin, @Nullable @Nullable ModelFace faces, boolean visibility) Creates an instance of aCuberecord class.- Parameters:
name- the value for thenamerecord 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 componentvisibility- the value for thevisibilityrecord component
-
-
Method Details
-
max
Gets max length of this cube- Parameters:
origin- origin- Returns:
- cube length
-
hasTexture
public boolean hasTexture()Checks this model has texture- Returns:
- model has texture
-
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
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-
inflate
public float inflate()Returns the value of theinflaterecord component.- Returns:
- the value of the
inflaterecord component
-
rotation
Returns the value of therotationrecord component.- Specified by:
rotationin interfaceBlueprintElement- Returns:
- the value of the
rotationrecord 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
public boolean visibility()Returns the value of thevisibilityrecord component.- Specified by:
visibilityin interfaceBlueprintElement- Returns:
- the value of the
visibilityrecord component
-