public class AnimationNode extends Object
Constructor and Description |
---|
AnimationNode(org.bukkit.util.Vector position,
com.bergerkiller.bukkit.common.math.Quaternion rotationQuaternion,
boolean active,
double duration)
Initializes a new Animation Node with a position, rotation and duration to the next node.
|
AnimationNode(org.bukkit.util.Vector position,
org.bukkit.util.Vector rotationVector,
boolean active,
double duration)
Initializes a new Animation Node with a position, rotation and duration to the next node.
|
Modifier and Type | Method and Description |
---|---|
void |
apply(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
Applies the position and rotation transformation of this animation node to a 4x4 transformation matrix
|
double |
getDuration()
Duration animating from this node to the next one in seconds.
|
org.bukkit.util.Vector |
getPosition()
Gets the relative position of this animation node.
|
com.bergerkiller.bukkit.common.math.Quaternion |
getRotationQuaternion()
Gets the relative rotation of this animation node as a Quaternion.
|
org.bukkit.util.Vector |
getRotationVector()
Gets the relative rotation of this animation node as a Vector.
|
static AnimationNode |
identity()
Creates an identity animation node (that does not do anything)
|
static AnimationNode |
interpolate(AnimationNode nodeA,
AnimationNode nodeB,
double theta)
Interpolates two nodes
|
boolean |
isActive()
Gets whether the attachment is active during the time this animation
node is actively playing.
|
static AnimationNode[] |
parseAllFromStrings(List<String> configList)
Parses all nodes in a list of configurations to an array of animation nodes.
|
static AnimationNode |
parseFromString(String config)
Parses the contents of an animation node from a configuration String.
|
String |
serializeToString()
Serializes the contents of this AnimationNode to a String that
parseFromString(String) accepts as input. |
public AnimationNode(org.bukkit.util.Vector position, com.bergerkiller.bukkit.common.math.Quaternion rotationQuaternion, boolean active, double duration)
position,
- null to deactivate the attachmentrotationQuaternion
- active
- whether the attachment is active (and visible) when this node is reachedduration
- public AnimationNode(org.bukkit.util.Vector position, org.bukkit.util.Vector rotationVector, boolean active, double duration)
position,
- null to deactivate the attachmentrotationVector
- active
- whether the attachment is active (and visible) when this node is reachedduration
- public org.bukkit.util.Vector getPosition()
public org.bukkit.util.Vector getRotationVector()
public com.bergerkiller.bukkit.common.math.Quaternion getRotationQuaternion()
public double getDuration()
public boolean isActive()
public void apply(com.bergerkiller.bukkit.common.math.Matrix4x4 transform)
transform
- public String serializeToString()
parseFromString(String)
accepts as input.public static AnimationNode parseFromString(String config)
config
- public static AnimationNode[] parseAllFromStrings(List<String> configList)
configList
- public static AnimationNode interpolate(AnimationNode nodeA, AnimationNode nodeB, double theta)
nodeA
- nodeB
- theta
- public static AnimationNode identity()
Copyright © 2019. All rights reserved.