hmi.elckerlyc.animationengine.motionunit
Interface MotionUnit

All Superinterfaces:
KeyPositionManager
All Known Implementing Classes:
AbstractMotionUnit, ControllerMU, DynamicEyeGazeMU, DynamicGazeMU, DynamicPointingMU, EyeGazeMU, GazeMU, HermiteSplinePhysicalTransitionMU, HermiteSplineTransitionMU, KeyframeMU, PointingMU, ProcAnimationMU, SlerpPhysicalTransitionMU, SlerpTransitionMU, SlerpTransitionStaticMU, TransitionMU

public interface MotionUnit
extends KeyPositionManager

An animation, typically with a peak-like structure, parameterized by a parameter set Contains a set of keys that map to 'world' time to animation time

Author:
welberge

Method Summary
 MotionUnit copy(AnimationPlayer p)
          Create a copy of this motion unit and link it to the animationplayer
 TimedMotionUnit createTMU(BMLBlockPeg bmlBlockPeg, String i, String bmlId)
          Creates the TimedMotionUnit corresponding to this motion unit
 String getParameterValue(String name)
           
 MotionUnit getPredictor(VJoint vPredict)
          Returns a new motion unit that can be used as a predictor for this motion unit, null if prediction is not attainable
 double getPreferedDuration()
           
 String getReplacementGroup()
          Get the motionunit replacement group (=typically the BML behavior) Used to determine the currently active persistent TMU for this group in the player Only one group is active at a time
 void play(double t)
          Executes the motion unit, typically by rotating some VJoints
 void setParameterValue(String name, float value)
           
 void setParameterValue(String name, String value)
           
 
Methods inherited from interface hmi.elckerlyc.animationengine.KeyPositionManager
addKeyPosition, getKeyPosition, getKeyPositions, removeKeyPosition, setKeyPositions
 

Method Detail

setParameterValue

void setParameterValue(String name,
                       float value)

setParameterValue

void setParameterValue(String name,
                       String value)

getParameterValue

String getParameterValue(String name)

play

void play(double t)
          throws MUPlayException
Executes the motion unit, typically by rotating some VJoints

Parameters:
t - execution time, 0 < t < 1
Throws:
MUPlayException - if the play fails for some reason

createTMU

TimedMotionUnit createTMU(BMLBlockPeg bmlBlockPeg,
                          String i,
                          String bmlId)
Creates the TimedMotionUnit corresponding to this motion unit

Parameters:
i - behaviour id
bmlId - BML block id
Returns:
the TMU

getPredictor

MotionUnit getPredictor(VJoint vPredict)
Returns a new motion unit that can be used as a predictor for this motion unit, null if prediction is not attainable

Parameters:
vPredict - VJoint to execute the prediction on
Returns:
predictor motion unit

getPreferedDuration

double getPreferedDuration()
Returns:
Prefered duration (in seconds) of this motion unit, 0 means not determined/infinite

copy

MotionUnit copy(AnimationPlayer p)
Create a copy of this motion unit and link it to the animationplayer


getReplacementGroup

String getReplacementGroup()
Get the motionunit replacement group (=typically the BML behavior) Used to determine the currently active persistent TMU for this group in the player Only one group is active at a time