hmi.elckerlyc.faceengine
Class FacePlayer

java.lang.Object
  extended by hmi.elckerlyc.faceengine.FacePlayer
All Implemented Interfaces:
PUExceptionCallback, Player

public class FacePlayer
extends Object
implements Player, PUExceptionCallback

play faces... by sending FAPs or Morph targets to the facial animation module... Configurable: you can give another emotionconverter of facsconverter -- e.g. loaded from different data files


Field Summary
private  EmotionConverter emotionConverter
           
private  FaceController faceController
           
private  FACSConverter facsConverter
           
private  PlanPlayer fpp
           
private static org.slf4j.Logger logger
           
private  List<PlanUnit> tmuRemove
           
private  ExceptionManager warningManager
           
 
Constructor Summary
FacePlayer(FaceController fc)
           
FacePlayer(FaceController fc, EmotionConverter ec, FACSConverter facsc)
           
 
Method Summary
 void addExceptionListener(BMLExceptionListener ws)
           
 void addTimedFaceUnit(TimedFaceUnit tfu)
           
 void clearAll(double time)
           
 Set<String> getBehaviours(String bmlId)
           
 EmotionConverter getEmotionConverter()
           
 double getEndTime(String behId, String bmlId)
           
 FaceController getFaceController()
           
 FACSConverter getFACSConverter()
           
 Set<String> getInvalidBehaviors()
           
 int getNumberOfTimedFaceUnits()
           
 void interruptBehaviourBlock(String bmlId, double time)
          Interrupts all behaviors in the block; that is: calls their stop and removes them from the plan
 void interruptTimedFaceUnit(String id, String bmlId, double globalTime)
          Remove the timed face unit constructed from given BML.
 void play(double time)
           
 void puException(PlanUnit fmu, String message, double time)
           
 void removeAllExceptionListeners()
           
 void reset()
          Reset the player.
 void setBMLBlockState(String bmlId, PlanUnitState state)
           
 void setParameterValue(String behId, String bmlId, String paramId, float value)
           
 void setParameterValue(String behId, String bmlId, String paramId, String value)
           
 void shutdown()
          Clean up resources constructed with the planner (e.g. for native stuff, spawned threads, ...).
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

private static org.slf4j.Logger logger

fpp

private PlanPlayer fpp

faceController

private FaceController faceController

emotionConverter

private EmotionConverter emotionConverter

facsConverter

private FACSConverter facsConverter

warningManager

private final ExceptionManager warningManager

tmuRemove

private List<PlanUnit> tmuRemove
Constructor Detail

FacePlayer

public FacePlayer(FaceController fc)

FacePlayer

public FacePlayer(FaceController fc,
                  EmotionConverter ec,
                  FACSConverter facsc)
Method Detail

getFaceController

public FaceController getFaceController()

getEmotionConverter

public EmotionConverter getEmotionConverter()

getFACSConverter

public FACSConverter getFACSConverter()

play

public void play(double time)

getNumberOfTimedFaceUnits

public int getNumberOfTimedFaceUnits()

interruptTimedFaceUnit

public void interruptTimedFaceUnit(String id,
                                   String bmlId,
                                   double globalTime)
Remove the timed face unit constructed from given BML.


addTimedFaceUnit

public void addTimedFaceUnit(TimedFaceUnit tfu)

getInvalidBehaviors

public Set<String> getInvalidBehaviors()

reset

public void reset()
Description copied from interface: Player
Reset the player.

Specified by:
reset in interface Player

clearAll

public void clearAll(double time)

addExceptionListener

public void addExceptionListener(BMLExceptionListener ws)
Specified by:
addExceptionListener in interface Player

removeAllExceptionListeners

public void removeAllExceptionListeners()
Specified by:
removeAllExceptionListeners in interface Player

setBMLBlockState

public void setBMLBlockState(String bmlId,
                             PlanUnitState state)
Specified by:
setBMLBlockState in interface Player

getEndTime

public double getEndTime(String behId,
                         String bmlId)
Specified by:
getEndTime in interface Player

getBehaviours

public Set<String> getBehaviours(String bmlId)
Specified by:
getBehaviours in interface Player

interruptBehaviourBlock

public void interruptBehaviourBlock(String bmlId,
                                    double time)
Description copied from interface: Player
Interrupts all behaviors in the block; that is: calls their stop and removes them from the plan

Specified by:
interruptBehaviourBlock in interface Player

puException

public void puException(PlanUnit fmu,
                        String message,
                        double time)
Specified by:
puException in interface PUExceptionCallback

setParameterValue

public void setParameterValue(String behId,
                              String bmlId,
                              String paramId,
                              float value)
Specified by:
setParameterValue in interface Player

setParameterValue

public void setParameterValue(String behId,
                              String bmlId,
                              String paramId,
                              String value)
Specified by:
setParameterValue in interface Player

shutdown

public void shutdown()
Description copied from interface: Player
Clean up resources constructed with the planner (e.g. for native stuff, spawned threads, ...). A planner should not be (re)used after shutting it down.

Specified by:
shutdown in interface Player