FaceGen 3 SDKs Reference
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Fg::Sam3Controls Struct 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]].
 

Detailed Description

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.

Member Function Documentation

◆ getAge() [1/2]

float Fg::Sam3Controls::getAge ( Sam3Coord const &  coord) const
Returns
Approximate age in years.

◆ getAge() [2/2]

float Fg::Sam3Controls::getAge ( Sam3Coord const &  coord,
FanTypeE  type 
) const
Returns
Approximate age in years for shape or color component of coordinate:
Parameters
coordFace coordinate
typeGet age from shape, color or both if type == FANTYPE_SIZE

◆ getAsymmetry()

float Fg::Sam3Controls::getAsymmetry ( Sam3Coord const &  coord) const
Returns
Asymmetry value > 0.0, usually close to 1.0
Parameters
coordFace coordinate.

◆ getCaricature()

float Fg::Sam3Controls::getCaricature ( Sam3Coord const &  coord,
FanRaceE  race,
FanTypeE  type 
) const
Returns
A value >= 0.0 (usually close to 1.0 for normal faces).
Parameters
coordFace coordinate.
raceRelative to average of which race ?
typeGet caricature for shape or color ?

◆ getGender() [1/2]

float Fg::Sam3Controls::getGender ( Sam3Coord const &  coord) const
Returns
A gender value where -1.0 is the average male and 1.0 is the average female.
Parameters
coordFace coordinate.

◆ getGender() [2/2]

float Fg::Sam3Controls::getGender ( Sam3Coord const &  coord,
FanTypeE  type 
) const
Returns
A gender value where -1.0 is the average male and 1.0 is the average female.
Parameters
coordFace coordinate.
typeFor shape, color or both (FANTYPE_ALL):

◆ getRace()

float Fg::Sam3Controls::getRace ( Sam3Coord const &  coord,
FanRaceE  from,
FanRaceE  to,
FanTypeE  type = FANTYPE_SIZE 
) const
inline
Returns
An interpolation value between the 'from' racial group and the 'to' racial group. Note that this value can be < 0.0 or > 1.0 if the face extrapolates the difference between the specified racial groups.
Parameters
coordFace coordinate.
from'from' race
to'to' race
typeOptionally get value from only shape or color component

Definition at line 144 of file Fg3Controls.hpp.

◆ getRaceLabels()

Svec< std::string > Fg::Sam3Controls::getRaceLabels ( ) const
Returns
A list of labels of the racial groups.

◆ getSliderName()

std::string Fg::Sam3Controls::getSliderName ( FanTypeE  type,
FanSymmE  symm,
size_t  id 
) const
Returns
The name of the given slider.
Parameters
typeShape or color slider ?
symmSymmetric or asymmetric slider ?
idSlider index number.

◆ getSliderNum()

size_t Fg::Sam3Controls::getSliderNum ( FanTypeE  type,
FanSymmE  symm 
) const
Returns
The number of sliders of the given type and symmetry.
Parameters
typeShape or color sliders ?
symmSymmetric or asymmetric sliders ?

◆ getSliderVal()

float Fg::Sam3Controls::getSliderVal ( Sam3Coord const &  coord,
FanTypeE  type,
FanSymmE  symm,
size_t  id 
) const
Returns
Current slider value.
Parameters
coordFace coordinate.
typeShape or color slider ?
symmSymmetric of asymmetric slider ?
idSlider index number.

◆ setAge()

Sam3Coord Fg::Sam3Controls::setAge ( Sam3Coord const &  coord,
float  age 
) const
inline

Functional version.

Definition at line 44 of file Fg3Controls.hpp.

◆ setAge_() [1/2]

void Fg::Sam3Controls::setAge_ ( Sam3Coord coord,
FanTypeE  type,
float  age 
) const
Parameters
coordMODIFIED: Face coordinate.
typeModify shape, color or combined (FANTYPE_SIZE) ?
ageAge in years. Must be >15 for best results.

◆ setAge_() [2/2]

void Fg::Sam3Controls::setAge_ ( Sam3Coord coord,
float  age 
) const
Parameters
coordMODIFIED: Face coordinate.
ageAge in years. Must be >15 for best results.

◆ setAsymmetry_()

void Fg::Sam3Controls::setAsymmetry_ ( Sam3Coord coord,
float  asymmetry 
) const
Parameters
coordMODIFIED: Face coordinate.
asymmetryMust be >= 0.0, usually close to 1.0 for normal faces

◆ setCaricature()

Sam3Coord Fg::Sam3Controls::setCaricature ( Sam3Coord const &  coord,
FanRaceE  race,
FanTypeE  type,
float  val 
) const
inline

Functional version.

Definition at line 97 of file Fg3Controls.hpp.

◆ setCaricature_()

void Fg::Sam3Controls::setCaricature_ ( Sam3Coord coord,
FanRaceE  race,
FanTypeE  type,
float  val 
) const
Parameters
coordMODIFIED: Face coordinate.
raceRelative to average of which race ?
typeSet caricature for shape of color ?
valA value >=0.0 (usually close to 1.0 for normal faces).

◆ setGender()

Sam3Coord Fg::Sam3Controls::setGender ( Sam3Coord const &  coord,
float  val 
)
inline

Functional version.

Definition at line 116 of file Fg3Controls.hpp.

◆ setGender_() [1/2]

void Fg::Sam3Controls::setGender_ ( Sam3Coord coord,
FanTypeE  type,
float  val 
) const
Parameters
coordMODIFIED: Face coordinate.
typeModify shape, color or combined ?
valA gender value where -1.0 is the average male and 1.0 is the average female.

◆ setGender_() [2/2]

void Fg::Sam3Controls::setGender_ ( Sam3Coord coord,
float  val 
) const
Parameters
coordMODIFIED: Face coordinate.
valA gender value where -1.0 is the average male and 1.0 is the average female.

◆ setRace()

Sam3Coord Fg::Sam3Controls::setRace ( Sam3Coord const &  coord,
FanRaceE  from,
FanRaceE  to,
float  tween 
)
inline

Functional version:

Definition at line 169 of file Fg3Controls.hpp.

◆ setRace_()

void Fg::Sam3Controls::setRace_ ( Sam3Coord coord,
FanRaceE  from,
FanRaceE  to,
float  tween,
FanTypeE  type = FANTYPE_SIZE 
) const
inline
Parameters
coordMODIFIED: Face coordinate.
from'from' race
to'to' race
tweenInterpolate value.
typeOptionally get value from only shape or color component

Definition at line 155 of file Fg3Controls.hpp.

◆ setRandom_()

void Fg::Sam3Controls::setRandom_ ( Sam3Coord coord,
FanRaceE  race,
FanGender  gender = FANGENDER_SIZE,
bool  ageLock = false,
bool  caricatureLock = false,
bool  asymmetryLock = false 
) const
Parameters
coordMODIFIED: Face coordinate.
raceDesired race. Use FANRACE_ALL for any race.
genderDesired gender. Do not specify for random gender.
ageLockKeep age the same.
caricatureLockKeep caricature the same.
asymmetryLockKeep asymmetry the same.

◆ setSliderVal_()

void Fg::Sam3Controls::setSliderVal_ ( Sam3Coord coord,
FanTypeE  type,
FanSymmE  symm,
size_t  id,
float  val 
) const
Parameters
coordMODIFIED: Face coordinate.
typeShape or color slider ?
symmSymmetric of asymmetric slider ?
idSlider index number.
valSet slider value.

◆ setToAverage_()

void Fg::Sam3Controls::setToAverage_ ( Sam3Coord coord,
FanRaceE  race,
FanGender  gender 
) const
Parameters
coordMODIFIED: Face coordinate.
raceDesired racial group. Use FANRACE_ALL for average of all racial groups.
genderDesired gender.

Member Data Documentation

◆ basisSize

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.

◆ genCtrls

Sam3NLCtrls Fg::Sam3Controls::genCtrls

Non-linear controls include demographics, caricature and asymmetry:

Definition at line 28 of file Fg3Controls.hpp.

◆ linCtrls

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.


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