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 aAnimation
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
calculateAnimationTime
(int tickCount) double
duration()
Returns the value of theduration
record component.final boolean
Indicates whether some other object is "equal to" this one.findNodeAnimation
(Node node) static Animation
fromAssimp
(org.lwjgl.assimp.AIAnimation assimpAnimation) fromAssimp
(org.lwjgl.assimp.AIScene scene) final int
hashCode()
Returns a hash code value for this object.name()
Returns the value of thename
record component.Returns the value of thenodeAnimations
record component.double
Returns the value of theticksPerSecond
record component.final String
toString()
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 aAnimation
record class.- Parameters:
name
- the value for thename
record componentticksPerSecond
- the value for theticksPerSecond
record componentduration
- the value for theduration
record componentnodeAnimations
- the value for thenodeAnimations
record 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 thename
record component.- Returns:
- the value of the
name
record component
-
ticksPerSecond
public double ticksPerSecond()Returns the value of theticksPerSecond
record component.- Returns:
- the value of the
ticksPerSecond
record component
-
duration
public double duration()Returns the value of theduration
record component.- Returns:
- the value of the
duration
record component
-
nodeAnimations
Returns the value of thenodeAnimations
record component.- Returns:
- the value of the
nodeAnimations
record component
-