hmi.facegraphics
Class HMIFaceController

java.lang.Object
  extended by hmi.facegraphics.HMIFaceController
All Implemented Interfaces:
FaceController

public class HMIFaceController
extends Object
implements FaceController

The FaceController is the access point for deforming the face of an avatar, just like VJoints are the accesspoint for deforming its body. This implementation controls the face of an avatar displayed in the HMI rendering environment.


Field Summary
private  MPEG4Configuration currentConfig
          store the current config, for add- and remove-mpeg4configuration
private  HashMap<String,Float> desiredMorphTargets
           
private  GLHead glHead
           
private  HashMap<String,Float> oldDesiredMorphTargets
          The set of morph targets to be set by doMorph, maintained through addMorphTargets and removeMorphTargets
private  ArrayList<String> possibleFaceMorphTargetNames
           
private  GLScene theGLScene
          Used to control morph targets...
 
Constructor Summary
HMIFaceController(GLScene gls, GLHead h)
          This constructor needs to get a link to the face and its morph targets!
 
Method Summary
 void addMorphTargets(String[] targetNames, float[] weights)
          Add given weights for given morph targets to the list of desired targets
 void addMPEG4Configuration(MPEG4Configuration config)
           
 void copy()
          NOTE: this function should be called in some synchronisation; to ensure that the values are not changed during the copy method!
 ArrayList<String> getPossibleFaceMorphTargetNames()
           
 void removeMorphTargets(String[] targetNames, float[] weights)
          Remove given weights for given morph targets from the list of desired targets
 void removeMPEG4Configuration(MPEG4Configuration config)
           
 void setMPEG4Configuration(MPEG4Configuration config)
          Directly set a FAP configuration on the face.
 void setPossibleFaceMorphTargetNames(ArrayList<String> names)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

theGLScene

private GLScene theGLScene
Used to control morph targets...


possibleFaceMorphTargetNames

private ArrayList<String> possibleFaceMorphTargetNames

currentConfig

private MPEG4Configuration currentConfig
store the current config, for add- and remove-mpeg4configuration


glHead

private GLHead glHead

oldDesiredMorphTargets

private HashMap<String,Float> oldDesiredMorphTargets
The set of morph targets to be set by doMorph, maintained through addMorphTargets and removeMorphTargets


desiredMorphTargets

private HashMap<String,Float> desiredMorphTargets
Constructor Detail

HMIFaceController

public HMIFaceController(GLScene gls,
                         GLHead h)
This constructor needs to get a link to the face and its morph targets! Maybe the GLScene, for setting morph targets, and some of Ronald Paul's stuff, for controlling FAPs

Method Detail

setMPEG4Configuration

public void setMPEG4Configuration(MPEG4Configuration config)
Description copied from interface: FaceController
Directly set a FAP configuration on the face. FAPs that are assigned NULL values will not be modified at all. All other FAPs will be completely overwritten with the new configuration, i.e., no blending is done.

Specified by:
setMPEG4Configuration in interface FaceController

addMPEG4Configuration

public void addMPEG4Configuration(MPEG4Configuration config)
Specified by:
addMPEG4Configuration in interface FaceController

removeMPEG4Configuration

public void removeMPEG4Configuration(MPEG4Configuration config)
Specified by:
removeMPEG4Configuration in interface FaceController

getPossibleFaceMorphTargetNames

public ArrayList<String> getPossibleFaceMorphTargetNames()
Specified by:
getPossibleFaceMorphTargetNames in interface FaceController

setPossibleFaceMorphTargetNames

public void setPossibleFaceMorphTargetNames(ArrayList<String> names)

copy

public void copy()
NOTE: this function should be called in some synchronisation; to ensure that the values are not changed during the copy method!

Specified by:
copy in interface FaceController

addMorphTargets

public void addMorphTargets(String[] targetNames,
                            float[] weights)
Add given weights for given morph targets to the list of desired targets

Specified by:
addMorphTargets in interface FaceController

removeMorphTargets

public void removeMorphTargets(String[] targetNames,
                               float[] weights)
Remove given weights for given morph targets from the list of desired targets

Specified by:
removeMorphTargets in interface FaceController