8#ifndef FAN_CONTROLS_HPP
9#define FAN_CONTROLS_HPP
11#include "FgSerial.hpp"
13#include "matrixCT.hpp"
14#include "binaryFile.hpp"
74 Svec<FanLinCtlS> grp[FANTYPE_SIZE][FANSYMM_SIZE];
77 uint dim[FANTYPE_SIZE][FANSYMM_SIZE],
78 bool useWideChar=
false);
80 const uint dim[FANTYPE_SIZE][FANSYMM_SIZE],
81 bool useWideChar=
false)
const;
87 MatF mean[FANTYPE_SIZE];
97 MatF invEigBasis[FANTYPE_SIZE];
102 MatF ctl[FANTYPE_SIZE];
116 MatF mean[FANTYPE_SIZE];
131 MatF basis[FANRACE_SIZE][FANTYPE_SIZE][FANATT_SIZE];
133 Mat22F invAttCov[FANRACE_SIZE][FANTYPE_SIZE];
140 bool readFromFile(
FutBinaryFileC &file,uint dim[FANTYPE_SIZE][FANSYMM_SIZE]);
156 float TSstdev=1.0f)
const;
164 float TSstdev=1.0f)
const;
170 Floats
const & baseCoord)
const;
191 float TSstdev=1.0f)
const;
199 float TSstdev)
const;
FanTypeE
Enumerate the statistical model types.
FanSymmE
Enumerate symmetry types.
FaceGen face space coordinate.
Non-linear controls include demographics, caricature and asymmetry:
Floats geneticRandom(float randomness, Floats const &baseCoord) const
Genetic random for a type/symm component:
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:
Sam3Coord randomHispanic(FanGender gender, float GSstdev=1.0f, float GAstdev=1.0f, float TSstdev=1.0f) const
Random face coordinate to approximate hispanic faces.
Sam3Coord geneticRandom(float randomness, Sam3Coord const &baseCoord) const
A type/symm coord component.
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: