hmi.elckerlyc.animationengine.transitions
Class HermiteSplineTransitionMU

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

public class HermiteSplineTransitionMU
extends TransitionMU

Can be used to create a C2 continuous transition between two kinematic motion units. The resulting motion approximates a minimum angular acceleration path for each joint.

Author:
Herwin van Welbergen

Field Summary
private static org.slf4j.Logger logger
           
private  AnimationPlayer player
           
private  float[] q
           
private  float[] qEnd
           
private  float[] qrate
           
private  float[] qStart
           
private  float[] qStartN
           
private  float[] qStartP
           
private  float[] wEnd
           
private  float[] wStart
           
 
Fields inherited from class hmi.elckerlyc.animationengine.transitions.TransitionMU
joints
 
Constructor Summary
HermiteSplineTransitionMU()
           
HermiteSplineTransitionMU(List<VJoint> j, AnimationPlayer p)
          Constructs the transition unit, assumes all lists have the same length, assumes kinematic control at the start of the transition: prev and next should be valid then
 
Method Summary
 TransitionMU copy(AnimationPlayer p)
          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()
           
 
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

player

private AnimationPlayer player

qStart

private float[] qStart

qStartP

private float[] qStartP

qStartN

private float[] qStartN

qEnd

private float[] qEnd

wStart

private float[] wStart

wEnd

private float[] wEnd

qrate

private float[] qrate

q

private float[] q

logger

private static org.slf4j.Logger logger
Constructor Detail

HermiteSplineTransitionMU

public HermiteSplineTransitionMU()

HermiteSplineTransitionMU

public HermiteSplineTransitionMU(List<VJoint> j,
                                 AnimationPlayer p)
Constructs the transition unit, assumes all lists have the same length, assumes kinematic control at the start of the transition: prev and next should be valid then

Parameters:
j - joints to steer
p - animation player that provides start and end poses and velocities
Method Detail

copy

public TransitionMU copy(AnimationPlayer p)
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

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

setStartPose

public void setStartPose()
Specified by:
setStartPose in class TransitionMU

setEndPose

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