When we start setting the fake coefficients after we set the real ones, make

sure all of the other coefficients are zero.
This commit is contained in:
Andrzej Kapolka 2014-01-10 14:42:05 -08:00
parent 4ae5203f38
commit 38118fdab0

View file

@ -95,6 +95,7 @@ void Faceshift::reset() {
void Faceshift::updateFakeCoefficients(float leftBlink, float rightBlink, float browUp,
float jawOpen, std::vector<float>& coefficients) const {
coefficients.resize(max((int)coefficients.size(), _jawOpenIndex + 1));
qFill(coefficients.begin(), coefficients.end(), 0.0f);
coefficients[_leftBlinkIndex] = leftBlink;
coefficients[_rightBlinkIndex] = rightBlink;
coefficients[_browUpCenterIndex] = browUp;