Package kr.toxicity.model.api.data.raw
Record Class ModelAnimator
java.lang.Object
java.lang.Record
kr.toxicity.model.api.data.raw.ModelAnimator
- Record Components:
name- the name of the bone group this animator affectskeyframes- the list of keyframes_rotationGlobal- whether the rotation is applied globally (true) or locally (false/null)
@Internal
public record ModelAnimator(@Nullable BoneName name, @Nullable List<ModelKeyframe> keyframes, @Nullable Boolean _rotationGlobal)
extends Record
Represents a raw animator from a model file, containing a set of keyframes for a specific bone group.
- Since:
- 1.15.2
-
Constructor Summary
ConstructorsConstructorDescriptionModelAnimator(@Nullable BoneName name, @Nullable List<ModelKeyframe> keyframes, @Nullable Boolean _rotationGlobal) Creates an instance of aModelAnimatorrecord class. -
Method Summary
Modifier and TypeMethodDescription@Nullable BooleanReturns the value of the_rotationGlobalrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanChecks if this animator is valid and has keyframes.booleanChecks if this animator contains any keyframes.@NotNull List<ModelKeyframe> Returns the list of keyframes for this animator.@NotNull BoneNamename()Returns the name of the bone group this animator affects.booleanChecks if the rotation should be applied globally.@NotNull Stream<ModelKeyframe> stream()Returns a sorted stream of valid keyframes.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ModelAnimator
public ModelAnimator(@Nullable @Nullable BoneName name, @Nullable @Nullable List<ModelKeyframe> keyframes, @Nullable @Nullable Boolean _rotationGlobal) Creates an instance of aModelAnimatorrecord class.- Parameters:
name- the value for thenamerecord componentkeyframes- the value for thekeyframesrecord component_rotationGlobal- the value for the_rotationGlobalrecord component
-
-
Method Details
-
rotationGlobal
public boolean rotationGlobal()Checks if the rotation should be applied globally.- Returns:
- true if rotation is global, false otherwise
- Since:
- 1.15.2
-
isAvailable
public boolean isAvailable()Checks if this animator is valid and has keyframes.- Returns:
- true if available, false otherwise
- Since:
- 1.15.2
-
isNotEmpty
public boolean isNotEmpty()Checks if this animator contains any keyframes.- Returns:
- true if not empty, false otherwise
- Since:
- 1.15.2
-
name
Returns the name of the bone group this animator affects.- Returns:
- the name of the bone group
-
keyframes
Returns the list of keyframes for this animator. If no keyframes are present, an empty list is returned.- Returns:
- the list of keyframes
-
stream
Returns a sorted stream of valid keyframes.- Returns:
- the stream of keyframes
- Since:
- 1.15.2
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
_rotationGlobal
Returns the value of the_rotationGlobalrecord component.- Returns:
- the value of the
_rotationGlobalrecord component
-