Main Page   Class Hierarchy   Compound List   File List   Compound Members  

SimpleFacialExpression Class Reference

A basic facial expression action. More...

#include <SimpleFacialExpression.h>

Inheritance diagram for SimpleFacialExpression:

FbaAction List of all members.

Public Member Functions

 SimpleFacialExpression (char *expressionName, long expressionDuration, float expressionIntensity)
 Constructor.

void start (long globalTime)
 Start the action.

FBAPs * getFBAPs (long globalTime, FBAPs *lastFBAPs, AFM *afm)
 Get FBAPs.

void stop ()
 Stop playing tracks.

char * actionTypeName ()
 Return the name of the action type.


Detailed Description

A basic facial expression action.

This is a simple implementation of an FbaAction, implemention the basic facial expression action. The expression can be one of the universal expressions - joy, sadness, anger, fear, disgust or surprise. It is set by passing the name of the desired expression to the constructor. The other parameter to be set is the duration time of the expression, in milliseconds.

SimpleFacialExpression uses a simple expression dynamics scheme with attack, sustain and decay phases. In the attack phase the intensity grows linearly; in the sustain phase it stays at the maximum; in the decay phase it falls linearly to 0.

Much more elaborate expression dynamic schemes can be implemented.

See also:
FbaAction

Definition at line 39 of file SimpleFacialExpression.h.


Constructor & Destructor Documentation

SimpleFacialExpression::SimpleFacialExpression char *  expressionName,
long  expressionDuration,
float  expressionIntensity
 

Constructor.

Construct a simple facial expression by choosing one of the standard expressions by name, and setting its duration time.

Parameters:
expressionName the name of the expression: joy, sadness, anger, fear, or surprise. Any other string will result in neutral expression. The expression name is not case sensitive.
expressionDuration the total duration time of the expression, in milliseconds
expressionIntensity the maximum intensity of the expression, 1.0 being the default expression intensity, higher values bringing more intense expressions

Definition at line 12 of file SimpleFacialExpression.cpp.

References close_b_l_eyelid, close_b_r_eyelid, close_t_l_eyelid, close_t_r_eyelid, FBAPs::faps, FAPs::llf, lower_t_lip_lm, lower_t_lip_rm, lower_t_midlip, lower_t_midlip_o, open_jaw, raise_b_lip_lm, raise_b_lip_rm, raise_b_midlip, raise_l_cornerlip, raise_l_i_eyebrow, raise_l_m_eyebrow, raise_l_o_eyebrow, raise_r_cornerlip, raise_r_i_eyebrow, raise_r_m_eyebrow, raise_r_o_eyebrow, FBAPs::setFAP(), squeeze_l_eyebrow, squeeze_r_eyebrow, stretch_l_cornerlip, stretch_r_cornerlip, and LLFAPs::value.


Member Function Documentation

char* SimpleFacialExpression::actionTypeName  )  [inline, virtual]
 

Return the name of the action type.

Returns:
the name of the action type.

Implements FbaAction.

Definition at line 86 of file SimpleFacialExpression.h.

FBAPs * SimpleFacialExpression::getFBAPs long  globalTime,
FBAPs *  lastFBAPs,
AFM *  afm
[virtual]
 

Get FBAPs.

This function returns the Face and Body Animation Parameters (FBAPs) for the time t. This function is called by the FAPlayer when the FbaAction is played in the FAPlayer. This implementation implements a simple expression dynamics scheme with attack, sustain and decay phases. In the attack phase the intensity grows linearly; in the sustain phase it stays at the maximum; in the decay phase it falls linearly to 0.

Parameters:
globalTime the time for which the FBAPs are requested, in milliseconds
lastFBAPs the final FBAPs from the previous frame of animation; in this implementation we ignore this parameter
afm the Animatable Face and Body Model currently used in the player; in this implementation we ignore this parameter
Returns:
the Face and Body Animation Parameters (FBAPs) for the requested time

Implements FbaAction.

Definition at line 204 of file SimpleFacialExpression.cpp.

References FBAPs::set().

void SimpleFacialExpression::start long  globalTime  )  [virtual]
 

Start the action.

This function is called by the FAPlayer when the playing starts.

Parameters:
globalTime the reference time when the action is started, in milliseconds

Implements FbaAction.

Definition at line 258 of file SimpleFacialExpression.cpp.

References FAP2::expression1, FAPs::fap2, FBAPs::faps, and FAP2::intensity1.

void SimpleFacialExpression::stop  )  [virtual]
 

Stop playing tracks.

Reset the face animation track.

Implements FbaAction.

Definition at line 271 of file SimpleFacialExpression.cpp.

References FAP2::expression1, FAPs::fap2, FBAPs::faps, and FAP2::intensity1.


The documentation for this class was generated from the following files:
Generated on Wed Nov 8 16:13:39 2006 for VisageLink by doxygen 1.3.1