hmi.elckerlyc.animationengine.transitions
Class SlerpTransitionMU

java.lang.Object
  extended by hmi.elckerlyc.animationengine.motionunit.AbstractMotionUnit
      extended by hmi.elckerlyc.animationengine.transitions.TransitionMU
          extended by hmi.elckerlyc.animationengine.transitions.SlerpTransitionMU
All Implemented Interfaces:
KeyPositionManager, MotionUnit

public class SlerpTransitionMU
extends TransitionMU


Field Summary
private  float[] endPose
           
private static org.slf4j.Logger logger
           
private  AnimationPlayer player
           
private  float[] qResult
           
private  VJoint startJoint
           
private  float[] startPose
           
 
Fields inherited from class hmi.elckerlyc.animationengine.transitions.TransitionMU
joints
 
Constructor Summary
SlerpTransitionMU()
           
SlerpTransitionMU(List<VJoint> j, VJoint startJ, AnimationPlayer p)
          Constructor
 
Method Summary
 TransitionMU copy(AnimationPlayer player)
          Create a copy of this motion unit and link it to the animationplayer
 void play(double t)
          Executes the motion unit, typically by rotating some VJoints
 void setEndPose(double endTime, double duration)
           
 void setStartPose()
          Set the current pose of the associated set of joints
 
Methods inherited from class hmi.elckerlyc.animationengine.transitions.TransitionMU
createTMU, filterJoints, getParameterValue, getPredictor, getPreferedDuration, getReplacementGroup, setParameterValue, setParameterValue
 
Methods inherited from class hmi.elckerlyc.animationengine.motionunit.AbstractMotionUnit
addKeyPosition, getKeyPosition, getKeyPositions, removeKeyPosition, setKeyPositions
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

endPose

private float[] endPose

startPose

private float[] startPose

qResult

private float[] qResult

player

private AnimationPlayer player

startJoint

private VJoint startJoint

logger

private static org.slf4j.Logger logger
Constructor Detail

SlerpTransitionMU

public SlerpTransitionMU()

SlerpTransitionMU

public SlerpTransitionMU(List<VJoint> j,
                         VJoint startJ,
                         AnimationPlayer p)
Constructor

Parameters:
j - joints to slerp (usually taken from animationPlayer.getVNext())
startJ - joint tree to grab the start rotations from (usually just root of the joints in j)
p - animation player used to predict the end pose
Method Detail

copy

public TransitionMU copy(AnimationPlayer player)
Description copied from interface: MotionUnit
Create a copy of this motion unit and link it to the animationplayer

Specified by:
copy in interface MotionUnit
Specified by:
copy in class TransitionMU

setStartPose

public void setStartPose()
Set the current pose of the associated set of joints

Specified by:
setStartPose in class TransitionMU

play

public void play(double t)
Description copied from interface: MotionUnit
Executes the motion unit, typically by rotating some VJoints

Specified by:
play in interface MotionUnit
Specified by:
play in class TransitionMU
Parameters:
t - execution time, 0 < t < 1

setEndPose

public void setEndPose(double endTime,
                       double duration)
Specified by:
setEndPose in class TransitionMU