Record Class Animation
java.lang.Object
java.lang.Record
com.pixelmonmod.pixelmon.client.render.entity.renderers.assimp.animation.Animation
public record Animation(String name, double ticksPerSecond, double duration, Map<String,NodeAnimation> nodeAnimations)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionAnimation(String name, double ticksPerSecond, double duration, Map<String, NodeAnimation> nodeAnimations) Creates an instance of aAnimationrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculateAnimationTime(int tickCount) doubleduration()Returns the value of thedurationrecord component.final booleanIndicates whether some other object is "equal to" this one.findNodeAnimation(Node node) static AnimationfromAssimp(org.lwjgl.assimp.AIAnimation assimpAnimation) fromAssimp(org.lwjgl.assimp.AIScene scene) final inthashCode()Returns a hash code value for this object.name()Returns the value of thenamerecord component.Returns the value of thenodeAnimationsrecord component.doubleReturns the value of theticksPerSecondrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Animation
public Animation(String name, double ticksPerSecond, double duration, Map<String, NodeAnimation> nodeAnimations) Creates an instance of aAnimationrecord class.- Parameters:
name- the value for thenamerecord componentticksPerSecond- the value for theticksPerSecondrecord componentduration- the value for thedurationrecord componentnodeAnimations- the value for thenodeAnimationsrecord component
-
-
Method Details
-
calculateAnimationTime
public double calculateAnimationTime(int tickCount) -
findNodeAnimation
-
fromAssimp
-
fromAssimp
-
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
-
ticksPerSecond
public double ticksPerSecond()Returns the value of theticksPerSecondrecord component.- Returns:
- the value of the
ticksPerSecondrecord component
-
duration
public double duration()Returns the value of thedurationrecord component.- Returns:
- the value of the
durationrecord component
-
nodeAnimations
Returns the value of thenodeAnimationsrecord component.- Returns:
- the value of the
nodeAnimationsrecord component
-