hmi.elckerlyc.animationengine.transitions
Class SlerpTransitionStaticMU

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

public class SlerpTransitionStaticMU
extends TransitionMU

Slerp transition from current pose to predefined end pose, typically for use in an animationplanplayer without using the animationplayer

Author:
welberge

Field Summary
private  float[] endPose
           
private  float[] qResult
           
private  List<VJoint> startJoints
           
private  float[] startPose
           
 
Fields inherited from class hmi.elckerlyc.animationengine.transitions.TransitionMU
joints
 
Constructor Summary
SlerpTransitionStaticMU()
           
SlerpTransitionStaticMU(List<VJoint> j, List<VJoint> startPoseJoints, float[] ep)
          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
 void setStartPose(float[] sp)
          Set the start pose
 
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

startJoints

private List<VJoint> startJoints

endPose

private float[] endPose

startPose

private float[] startPose

qResult

private float[] qResult
Constructor Detail

SlerpTransitionStaticMU

public SlerpTransitionStaticMU()

SlerpTransitionStaticMU

public SlerpTransitionStaticMU(List<VJoint> j,
                               List<VJoint> startPoseJoints,
                               float[] ep)
Constructor

Parameters:
j - joints to slerp (usually taken from animationPlayer.getVNext()
startPoseJoints - joints to take start pose from (usually taken from the final VJoint human on which animation and physics are combined)
ep - end pose, contains quaternion joint rotations for each joint
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(float[] sp)
Set the start pose

Parameters:
sp - the new start pose

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