#include <SimpleFacialExpression.h>
Inheritance diagram for SimpleFacialExpression:
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. |
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.
Definition at line 39 of file SimpleFacialExpression.h.
|
Constructor. Construct a simple facial expression by choosing one of the standard expressions by name, and setting its duration time.
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. |
|
Return the name of the action type.
Implements FbaAction. Definition at line 86 of file SimpleFacialExpression.h. |
|
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.
Implements FbaAction. Definition at line 204 of file SimpleFacialExpression.cpp. References FBAPs::set(). |
|
Start the action. This function is called by the FAPlayer when the playing starts.
Implements FbaAction. Definition at line 258 of file SimpleFacialExpression.cpp. References FAP2::expression1, FAPs::fap2, FBAPs::faps, and FAP2::intensity1. |
|
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. |