|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.elckerlyc.planunit.AbstractPlanUnit
hmi.elckerlyc.faceengine.faceunit.TimedFaceUnit
public class TimedFaceUnit
When you do not set an end time peg, 'UNKNOWN' is assumed. This leads to the faceunit being timed as starttime..starttime+getpreferredduration When you do not set a start time peg, the animation cannot be played
| Field Summary | |
|---|---|
FaceUnit |
fu
|
protected ArrayList<KeyPosition> |
progressHandled
|
private PlanUnitTimeManager |
puTimeManager
|
| Fields inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
|---|
bmlBlockPeg |
| Constructor Summary | |
|---|---|
TimedFaceUnit(BMLBlockPeg bbPeg,
String i,
String bmlId,
FaceUnit f)
Constructor |
|
| Method Summary | |
|---|---|
void |
cleanup()
|
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) |
FaceUnit |
getFaceUnit()
|
KeyPosition |
getKeyPosition(String kid)
Gets the keyposition with id id |
KeyPosition |
getKeyPosition(TimePeg sp)
|
double |
getNextPegTime(String pid)
|
Map<KeyPosition,TimePeg> |
getPegs()
|
double |
getPegTime(String pid)
|
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 syncId)
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). |
void |
playUnit(double time)
|
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 |
protected void |
stopUnit(double time)
|
| Methods inherited from class hmi.elckerlyc.planunit.AbstractPlanUnit |
|---|
addFeedbackListener, feedback, getBMLBlockPeg, getBMLId, getId, getState, isDone, isLurking, isPlaying, isSubUnit, play, reset, resetUnit, 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 |
|---|
public final FaceUnit fu
protected ArrayList<KeyPosition> progressHandled
private final PlanUnitTimeManager puTimeManager
| Constructor Detail |
|---|
public TimedFaceUnit(BMLBlockPeg bbPeg,
String i,
String bmlId,
FaceUnit f)
i - behaviour idbmlId - BML block idf - face 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 getPegTime(String pid)
public TimePeg getTimePeg(String pid)
PlanUnit
public List<String> getAvailableSyncs()
PlanUnit
getAvailableSyncs in interface PlanUnitgetAvailableSyncs in class AbstractPlanUnitpublic double getEndTime()
PlanUnit
public void setTimePeg(String kid,
TimePeg sp)
PlanUnit
public void setTimePeg(KeyPosition kp,
TimePeg sp)
public double getStartTime()
PlanUnit
public double getTime(String syncId)
PlanUnit
getTime in interface PlanUnitgetTime in class AbstractPlanUnit
public double getRelativeTime(String syncId)
throws RelativeSyncNotFoundException
PlanUnit
getRelativeTime in interface PlanUnitgetRelativeTime in class AbstractPlanUnitRelativeSyncNotFoundExceptionpublic KeyPosition getKeyPosition(String kid)
private void sendProgress(double t,
double time)
t - canonical time 0 <= t <=1time - time since start of BML execution
public void playUnit(double time)
throws PlayException
playUnit in class AbstractPlanUnitPlayExceptionpublic void cleanup()
public FaceUnit getFaceUnit()
protected void stopUnit(double time)
throws PlayException
stopUnit in class AbstractPlanUnitPlayExceptionpublic String getReplacementGroup()
PlanUnit
getReplacementGroup in interface PlanUnitgetReplacementGroup in class AbstractPlanUnitpublic double getPreferedDuration()
PlanUnit
getPreferedDuration in interface PlanUnitgetPreferedDuration 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 | |||||||||