FaceGen 3 SDKs Reference
|
#include <Fg3Controls.hpp>
Public Member Functions | |
Sam3Controls (String8 const &ctlFile) | |
float | getAge (Sam3Coord const &coord) const |
void | setAge_ (Sam3Coord &coord, float age) const |
Sam3Coord | setAge (Sam3Coord const &coord, float age) const |
Functional version. | |
float | getAge (Sam3Coord const &coord, FanTypeE type) const |
void | setAge_ (Sam3Coord &coord, FanTypeE type, float age) const |
float | getAsymmetry (Sam3Coord const &coord) const |
void | setAsymmetry_ (Sam3Coord &coord, float asymmetry) const |
float | getCaricature (Sam3Coord const &coord, FanRaceE race, FanTypeE type) const |
void | setCaricature_ (Sam3Coord &coord, FanRaceE race, FanTypeE type, float val) const |
Sam3Coord | setCaricature (Sam3Coord const &coord, FanRaceE race, FanTypeE type, float val) const |
Functional version. | |
float | getGender (Sam3Coord const &coord) const |
void | setGender_ (Sam3Coord &coord, float val) const |
Sam3Coord | setGender (Sam3Coord const &coord, float val) |
Functional version. | |
float | getGender (Sam3Coord const &coord, FanTypeE type) const |
void | setGender_ (Sam3Coord &coord, FanTypeE type, float val) const |
Svec< std::string > | getRaceLabels () const |
float | getRace (Sam3Coord const &coord, FanRaceE from, FanRaceE to, FanTypeE type=FANTYPE_SIZE) const |
void | setRace_ (Sam3Coord &coord, FanRaceE from, FanRaceE to, float tween, FanTypeE type=FANTYPE_SIZE) const |
Sam3Coord | setRace (Sam3Coord const &coord, FanRaceE from, FanRaceE to, float tween) |
Functional version: | |
void | setRandom_ (Sam3Coord &coord, FanRaceE race, FanGender gender=FANGENDER_SIZE, bool ageLock=false, bool caricatureLock=false, bool asymmetryLock=false) const |
size_t | getSliderNum (FanTypeE type, FanSymmE symm) const |
std::string | getSliderName (FanTypeE type, FanSymmE symm, size_t id) const |
float | getSliderVal (Sam3Coord const &coord, FanTypeE type, FanSymmE symm, size_t id) const |
void | setSliderVal_ (Sam3Coord &coord, FanTypeE type, FanSymmE symm, size_t id, float val) const |
void | setToAverage_ (Sam3Coord &coord, FanRaceE race, FanGender gender) const |
Public Attributes | |
Sam3LinCtrls | linCtrls |
Sam3NLCtrls | genCtrls |
Non-linear controls include demographics, caricature and asymmetry: | |
uint | basisSize [FANTYPE_SIZE][FANSYMM_SIZE] |
Number of modes of each type. Almost always [[50 30] [50 0]]. | |
Holds the data for all the face editing controls and random face distributions. This data is stored in the 'si.ctl' file. You cannot apply any controls without loading this file.
Definition at line 22 of file Fg3Controls.hpp.
float Fg::Sam3Controls::getAge | ( | Sam3Coord const & | coord | ) | const |
coord | Face coordinate |
type | Get age from shape, color or both if type == FANTYPE_SIZE |
float Fg::Sam3Controls::getAsymmetry | ( | Sam3Coord const & | coord | ) | const |
coord | Face coordinate. |
float Fg::Sam3Controls::getCaricature | ( | Sam3Coord const & | coord, |
FanRaceE | race, | ||
FanTypeE | type | ||
) | const |
coord | Face coordinate. |
race | Relative to average of which race ? |
type | Get caricature for shape or color ? |
float Fg::Sam3Controls::getGender | ( | Sam3Coord const & | coord | ) | const |
coord | Face coordinate. |
coord | Face coordinate. |
type | For shape, color or both (FANTYPE_ALL): |
|
inline |
coord | Face coordinate. |
from | 'from' race |
to | 'to' race |
type | Optionally get value from only shape or color component |
Definition at line 144 of file Fg3Controls.hpp.
Svec< std::string > Fg::Sam3Controls::getRaceLabels | ( | ) | const |
type | Shape or color slider ? |
symm | Symmetric or asymmetric slider ? |
id | Slider index number. |
type | Shape or color sliders ? |
symm | Symmetric or asymmetric sliders ? |
float Fg::Sam3Controls::getSliderVal | ( | Sam3Coord const & | coord, |
FanTypeE | type, | ||
FanSymmE | symm, | ||
size_t | id | ||
) | const |
coord | Face coordinate. |
type | Shape or color slider ? |
symm | Symmetric of asymmetric slider ? |
id | Slider index number. |
Functional version.
Definition at line 44 of file Fg3Controls.hpp.
coord | MODIFIED: Face coordinate. |
type | Modify shape, color or combined (FANTYPE_SIZE) ? |
age | Age in years. Must be >15 for best results. |
void Fg::Sam3Controls::setAge_ | ( | Sam3Coord & | coord, |
float | age | ||
) | const |
coord | MODIFIED: Face coordinate. |
age | Age in years. Must be >15 for best results. |
void Fg::Sam3Controls::setAsymmetry_ | ( | Sam3Coord & | coord, |
float | asymmetry | ||
) | const |
coord | MODIFIED: Face coordinate. |
asymmetry | Must be >= 0.0, usually close to 1.0 for normal faces |
|
inline |
Functional version.
Definition at line 97 of file Fg3Controls.hpp.
void Fg::Sam3Controls::setCaricature_ | ( | Sam3Coord & | coord, |
FanRaceE | race, | ||
FanTypeE | type, | ||
float | val | ||
) | const |
coord | MODIFIED: Face coordinate. |
race | Relative to average of which race ? |
type | Set caricature for shape of color ? |
val | A value >=0.0 (usually close to 1.0 for normal faces). |
Functional version.
Definition at line 116 of file Fg3Controls.hpp.
coord | MODIFIED: Face coordinate. |
type | Modify shape, color or combined ? |
val | A gender value where -1.0 is the average male and 1.0 is the average female. |
void Fg::Sam3Controls::setGender_ | ( | Sam3Coord & | coord, |
float | val | ||
) | const |
coord | MODIFIED: Face coordinate. |
val | A gender value where -1.0 is the average male and 1.0 is the average female. |
|
inline |
Functional version:
Definition at line 169 of file Fg3Controls.hpp.
|
inline |
coord | MODIFIED: Face coordinate. |
from | 'from' race |
to | 'to' race |
tween | Interpolate value. |
type | Optionally get value from only shape or color component |
Definition at line 155 of file Fg3Controls.hpp.
void Fg::Sam3Controls::setRandom_ | ( | Sam3Coord & | coord, |
FanRaceE | race, | ||
FanGender | gender = FANGENDER_SIZE , |
||
bool | ageLock = false , |
||
bool | caricatureLock = false , |
||
bool | asymmetryLock = false |
||
) | const |
coord | MODIFIED: Face coordinate. |
race | Desired race. Use FANRACE_ALL for any race. |
gender | Desired gender. Do not specify for random gender. |
ageLock | Keep age the same. |
caricatureLock | Keep caricature the same. |
asymmetryLock | Keep asymmetry the same. |
void Fg::Sam3Controls::setSliderVal_ | ( | Sam3Coord & | coord, |
FanTypeE | type, | ||
FanSymmE | symm, | ||
size_t | id, | ||
float | val | ||
) | const |
coord | MODIFIED: Face coordinate. |
type | Shape or color slider ? |
symm | Symmetric of asymmetric slider ? |
id | Slider index number. |
val | Set slider value. |
coord | MODIFIED: Face coordinate. |
race | Desired racial group. Use FANRACE_ALL for average of all racial groups. |
gender | Desired gender. |
uint Fg::Sam3Controls::basisSize[FANTYPE_SIZE][FANSYMM_SIZE] |
Number of modes of each type. Almost always [[50 30] [50 0]].
Definition at line 30 of file Fg3Controls.hpp.
Sam3NLCtrls Fg::Sam3Controls::genCtrls |
Non-linear controls include demographics, caricature and asymmetry:
Definition at line 28 of file Fg3Controls.hpp.
Sam3LinCtrls Fg::Sam3Controls::linCtrls |
Linear controls are all the controls found under the 'Shape' and 'Color' tabs in FaceGen Modeller.
Definition at line 26 of file Fg3Controls.hpp.