hmi.elckerlyc.animationengine.gaze
Class EyeGazeMU

java.lang.Object
  extended by hmi.elckerlyc.animationengine.gaze.GazeMU
      extended by hmi.elckerlyc.animationengine.gaze.EyeGazeMU
All Implemented Interfaces:
KeyPositionManager, MotionUnit

public class EyeGazeMU
extends GazeMU

Constant velocity saccade to target Assumes target and head are not moving

Author:
Herwin van Welbergen

Field Summary
private  float[] qEyeLeft
           
private  float[] qEyeRight
           
 
Fields inherited from class hmi.elckerlyc.animationengine.gaze.GazeMU
lEye, neck, offsetAngle, offsetDirection, player, preparationDuration, qGaze, qStart, qStartLeftEye, qStartRightEye, qTemp, ready, relax, relaxDuration, rEye, target, tmp, vecTemp, woManager, woTarget
 
Constructor Summary
EyeGazeMU()
           
 
Method Summary
 EyeGazeMU 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
 MotionUnit getPredictor(VJoint vPredict)
          Creates a gaze predictor.
 double getPreferedDuration()
           
 void play(double t)
          Executes the motion unit, typically by rotating some VJoints
(package private)  void setEndRotation(float[] gazeDir)
           
 
Methods inherited from class hmi.elckerlyc.animationengine.gaze.GazeMU
addKeyPosition, getKeyPosition, getKeyPositions, getOffsetRotation, getParameterValue, getReplacementGroup, removeKeyPosition, setEndRotation, setKeyPositions, setParameterValue, setParameterValue, setStartPose, setTarget, setTimeManipulator
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

qEyeLeft

private float[] qEyeLeft

qEyeRight

private float[] qEyeRight
Constructor Detail

EyeGazeMU

public EyeGazeMU()
Method Detail

copy

public EyeGazeMU 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
Overrides:
copy in class GazeMU

createTMU

public TimedMotionUnit createTMU(BMLBlockPeg bmlBlockPeg,
                                 String i,
                                 String bmlId)
Description copied from interface: MotionUnit
Creates the TimedMotionUnit corresponding to this motion unit

Specified by:
createTMU in interface MotionUnit
Overrides:
createTMU in class GazeMU
i - behaviour id
bmlId - BML block id
Returns:
the TMU

setEndRotation

void setEndRotation(float[] gazeDir)
              throws MUPlayException
Overrides:
setEndRotation in class GazeMU
Parameters:
gazeDir - gaze direction
Throws:
MUPlayException

play

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

Specified by:
play in interface MotionUnit
Overrides:
play in class GazeMU
Parameters:
t - execution time, 0 < t < 1
Throws:
MUPlayException - if the play fails for some reason

getPredictor

public MotionUnit getPredictor(VJoint vPredict)
Description copied from class: GazeMU
Creates a gaze predictor. The gaze predictor starts at whatever start pose the first call to play on its TMU will set. This also locks the target pos. Since the GazeMU allows flexible start poses, it's not very handy nor needed to use a prediction on any time before the ready sync.

Specified by:
getPredictor in interface MotionUnit
Overrides:
getPredictor in class GazeMU
Parameters:
vPredict - VJoint to execute the prediction on
Returns:
predictor motion unit

getPreferedDuration

public double getPreferedDuration()
Specified by:
getPreferedDuration in interface MotionUnit
Overrides:
getPreferedDuration in class GazeMU
Returns:
Prefered duration (in seconds) of this motion unit, 0 means not determined/infinite