|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.planunit.AbstractPlanUnit
hmi.elckerlyc.animationengine.motionunit.TimedMotionUnit
public class TimedMotionUnit
When you do not set an end time peg, 'UNKNNOWN' is assumed. This leads to the motionunit being timed as starttime..starttime+getpreferredduration When you do not set a start time peg, the animation cannot be played
| Field Summary | |
|---|---|
private org.slf4j.Logger |
logger
|
private MotionUnit |
mu
|
protected ArrayList<KeyPosition> |
progressHandled
|
private PlanUnitTimeManager |
puTimeManager
|
| Fields inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
|---|
bmlBlockPeg |
| Constructor Summary | |
|---|---|
TimedMotionUnit(BMLBlockPeg bmlBlockPeg,
String i,
String bmlId,
MotionUnit m)
Constructor |
|
| Method Summary | |
|---|---|
List<String> |
getAvailableSyncs()
Get the list of sync ids that can be used in this behavior. |
double |
getEndTime()
Get the global end time of the PlanUnit, TimePeg.VALUEUNKNOWN if not known (yet) |
KeyPosition |
getKeyPosition(String kid)
|
KeyPosition |
getKeyPosition(TimePeg sp)
|
MotionUnit |
getMotionUnit()
|
double |
getNextPegTime(String pid)
|
Map<KeyPosition,TimePeg> |
getPegs()
|
TimedMotionUnit |
getPredictor(VJoint vPredict)
Gets a predictor for this timed motion unit, returns null if no predictor can be made |
double |
getPreferedDuration()
0 is unknown/persistent |
double |
getPrevPegTime(String pid)
|
double |
getRelativeTime(String syncId)
Get the relative timing of this sync id Implementing classes should at least provide valid relative times for the BML sync points |
String |
getReplacementGroup()
Get the PlanUnit replacement group (=typically the BML behavior) Used to determine the currently active persistent PlanUnit for this group in the player Only one group is active at a time null is none |
double |
getStartTime()
Get the global start time of the PlanUnit, TimePeg.VALUEUNKNOWN if not known (yet) |
double |
getTime(String pid)
Get the global time of sync syncId of the PlanUnit, TimePeg.VALUEUNKNOWN if not known (yet) |
TimePeg |
getTimePeg(String pid)
null is not set |
boolean |
hasValidTiming()
Checks if the timing of this plan unit is 'valid' (e.g. stuff like start is earlier than end, but also planunit specific stuff like biomechanically possible timing). |
protected void |
playUnit(double time)
|
void |
resetUnit()
|
void |
resolveDefaultBMLKeyPositions()
Fills out default BML keypositions that are not yet in the TimedMotionUnit. |
private void |
sendProgress(double t,
double time)
Send progress feedback for all key positions passed at canonical time t. |
void |
setParameterValue(String paramId,
float value)
Sets a parameter value |
void |
setParameterValue(String paramId,
String value)
Sets a parameter value |
void |
setTimePeg(KeyPosition kp,
TimePeg sp)
|
void |
setTimePeg(String kid,
TimePeg sp)
Assigns a TimePeg to a sync in the PlanUnit |
void |
stopUnit(double time)
|
| Methods inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
|---|
addFeedbackListener, feedback, getBMLBlockPeg, getBMLId, getId, getState, isDone, isLurking, isPlaying, isSubUnit, play, reset, setState, setSubUnit, start, startUnit, stop |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private org.slf4j.Logger logger
private final MotionUnit mu
protected ArrayList<KeyPosition> progressHandled
private final PlanUnitTimeManager puTimeManager
| Constructor Detail |
|---|
public TimedMotionUnit(BMLBlockPeg bmlBlockPeg,
String i,
String bmlId,
MotionUnit m)
bmlBlockPeg - i - behaviour idbmlId - BML block idm - motion unit| Method Detail |
|---|
public boolean hasValidTiming()
PlanUnit
public Map<KeyPosition,TimePeg> getPegs()
public KeyPosition getKeyPosition(TimePeg sp)
public double getPrevPegTime(String pid)
public double getNextPegTime(String pid)
public double getTime(String pid)
PlanUnit
getTime in interface PlanUnitgetTime in class AbstractPlanUnitpublic TimePeg getTimePeg(String pid)
PlanUnit
public double getRelativeTime(String syncId)
throws RelativeSyncNotFoundException
PlanUnit
getRelativeTime in interface PlanUnitgetRelativeTime in class AbstractPlanUnitRelativeSyncNotFoundExceptionpublic double getEndTime()
PlanUnit
public void setTimePeg(String kid,
TimePeg sp)
PlanUnit
public void setTimePeg(KeyPosition kp,
TimePeg sp)
public double getStartTime()
PlanUnit
public TimedMotionUnit getPredictor(VJoint vPredict)
vPredict - VJoint the predictor acts on
public void resolveDefaultBMLKeyPositions()
public KeyPosition getKeyPosition(String kid)
private void sendProgress(double t,
double time)
t - canonical time 0 <= t <=1time - time since start of BML execution
protected void playUnit(double time)
throws TMUPlayException
playUnit in class AbstractPlanUnitTMUPlayExceptionpublic void stopUnit(double time)
stopUnit in class AbstractPlanUnitpublic void resetUnit()
resetUnit in class AbstractPlanUnitpublic MotionUnit getMotionUnit()
public String getReplacementGroup()
PlanUnit
getReplacementGroup in interface PlanUnitgetReplacementGroup in class AbstractPlanUnitpublic double getPreferedDuration()
PlanUnit
getPreferedDuration in interface PlanUnitgetPreferedDuration in class AbstractPlanUnitpublic List<String> getAvailableSyncs()
PlanUnit
getAvailableSyncs in interface PlanUnitgetAvailableSyncs in class AbstractPlanUnit
public void setParameterValue(String paramId,
String value)
PlanUnit
public void setParameterValue(String paramId,
float value)
PlanUnit
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||