FaceGen 3 SDKs Reference
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Fg::Sam3NLCtrls Struct Reference

Non-linear controls include demographics, caricature and asymmetry: More...

#include <FanControls.hpp>

Public Member Functions

bool readFromFile (FutBinaryFileC &file, uint dim[FANTYPE_SIZE][FANSYMM_SIZE])
 
float getAttribute (FanRaceE, FanAttribE, FanTypeE, Sam3Coord const &) const
 
void setAttributes (FanRaceE, FanTypeE, const float val[FANATT_SIZE], Sam3Coord &) const
 
float getCaricature (FanRaceE, FanTypeE, FanSymmE, Sam3Coord const &) const
 
void setCaricature_ (FanRaceE, FanTypeE, FanSymmE, float, Sam3Coord &) const
 
float getRace (FanRaceE, FanRaceE, Sam3Coord const &, FanTypeE type=FANTYPE_SIZE) const
 
float getRaceCS (FanRaceE, FanRaceE, Floats const &) const
 
void setRace_ (FanRaceE, FanRaceE, float, Sam3Coord &, FanTypeE type=FANTYPE_SIZE) const
 
Sam3Coord random (FanRaceE race, FanGender gender, float GSstdev=1.0f, float GAstdev=1.0f, float TSstdev=1.0f) const
 Random face coordinate from given racial group and gender:
 
Sam3Coord randomHispanic (FanGender gender, float GSstdev=1.0f, float GAstdev=1.0f, float TSstdev=1.0f) const
 Random face coordinate to approximate hispanic faces.
 
Floats geneticRandom (float randomness, Floats const &baseCoord) const
 Genetic random for a type/symm component:
 
Sam3Coord geneticRandom (float randomness, Sam3Coord const &baseCoord) const
 A type/symm coord component.
 
void reflect (FanRaceE, Sam3Coord &) const
 
void geneticTween (FanTypeE, FanSymmE, float, Sam3Coord const &, Sam3Coord const &, Sam3Coord &)
 
Sam3Coord genderRandom (FanGender gend, float GSstdev=1.0f, float GAstdev=1.0f, float TSstdev=1.0f) const
 Random face from gender-specific distributions:
 

Public Attributes

bool initialized
 
FanRaceDistS distrib [FANRACE_SIZE]
 
FanPrtOffLinCtlS attr [FANRACE_SIZE][FANATT_SIZE][FANTYPE_SIZE]
 
FanOffLinCtlS raceCtrls [FANRACE_SIZE][FANRACE_SIZE]
 
MatF basis [FANRACE_SIZE][FANTYPE_SIZE][FANATT_SIZE]
 
Mat22F invAttCov [FANRACE_SIZE][FANTYPE_SIZE]
 
FanGenderDist genderDistrib [FANGENDER_SIZE]
 

Detailed Description

Non-linear controls include demographics, caricature and asymmetry:

Definition at line 121 of file FanControls.hpp.

Constructor & Destructor Documentation

◆ Sam3NLCtrls()

Fg::Sam3NLCtrls::Sam3NLCtrls ( )
inline

Definition at line 138 of file FanControls.hpp.

Member Function Documentation

◆ genderRandom()

Sam3Coord Fg::Sam3NLCtrls::genderRandom ( FanGender  gend,
float  GSstdev = 1.0f,
float  GAstdev = 1.0f,
float  TSstdev = 1.0f 
) const

Random face from gender-specific distributions:

Parameters
GSstdevMust use specific gender here, not FANGENDER_SIZE

◆ geneticRandom() [1/2]

Floats Fg::Sam3NLCtrls::geneticRandom ( float  randomness,
Floats const &  baseCoord 
) const

Genetic random for a type/symm component:

Parameters
baseCoordTypically between 0.1 and 0.5

◆ geneticRandom() [2/2]

Sam3Coord Fg::Sam3NLCtrls::geneticRandom ( float  randomness,
Sam3Coord const &  baseCoord 
) const

A type/symm coord component.

Genetic random over shape/color, symm/asym:

Parameters
baseCoordTypically between 0.1 and 0.5

◆ geneticTween()

void Fg::Sam3NLCtrls::geneticTween ( FanTypeE  ,
FanSymmE  ,
float  ,
Sam3Coord const &  ,
Sam3Coord const &  ,
Sam3Coord  
)

A caricature-preserving tween, which better preserves unique features of the parents than a linear interpolation:

◆ random()

Sam3Coord Fg::Sam3NLCtrls::random ( FanRaceE  race,
FanGender  gender,
float  GSstdev = 1.0f,
float  GAstdev = 1.0f,
float  TSstdev = 1.0f 
) const

Random face coordinate from given racial group and gender:

Parameters
genderUse FANRACE_ALL for random racial group
GSstdevUse FANGENDER_SIZE for random gender

◆ randomHispanic()

Sam3Coord Fg::Sam3NLCtrls::randomHispanic ( FanGender  gender,
float  GSstdev = 1.0f,
float  GAstdev = 1.0f,
float  TSstdev = 1.0f 
) const

Random face coordinate to approximate hispanic faces.

Parameters
GSstdevUse FANGENDER_SIZE for random gender

Member Data Documentation

◆ attr

FanPrtOffLinCtlS Fg::Sam3NLCtrls::attr[FANRACE_SIZE][FANATT_SIZE][FANTYPE_SIZE]

Definition at line 126 of file FanControls.hpp.

◆ basis

MatF Fg::Sam3NLCtrls::basis[FANRACE_SIZE][FANTYPE_SIZE][FANATT_SIZE]

Definition at line 131 of file FanControls.hpp.

◆ distrib

FanRaceDistS Fg::Sam3NLCtrls::distrib[FANRACE_SIZE]

Definition at line 125 of file FanControls.hpp.

◆ genderDistrib

FanGenderDist Fg::Sam3NLCtrls::genderDistrib[FANGENDER_SIZE]

Definition at line 136 of file FanControls.hpp.

◆ initialized

bool Fg::Sam3NLCtrls::initialized

Definition at line 123 of file FanControls.hpp.

◆ invAttCov

Mat22F Fg::Sam3NLCtrls::invAttCov[FANRACE_SIZE][FANTYPE_SIZE]

Definition at line 133 of file FanControls.hpp.

◆ raceCtrls

FanOffLinCtlS Fg::Sam3NLCtrls::raceCtrls[FANRACE_SIZE][FANRACE_SIZE]

Definition at line 128 of file FanControls.hpp.


The documentation for this struct was generated from the following file: