From 1b34b80b1a53555fc975acecc30ce05c9de94d41 Mon Sep 17 00:00:00 2001 From: David Rowe Date: Tue, 3 Mar 2015 11:05:59 -0800 Subject: [PATCH] Use BrowsC_U to control both brows' up and down --- interface/src/devices/DdeFaceTracker.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/interface/src/devices/DdeFaceTracker.cpp b/interface/src/devices/DdeFaceTracker.cpp index 9ebe1ef718..9d753d228d 100644 --- a/interface/src/devices/DdeFaceTracker.cpp +++ b/interface/src/devices/DdeFaceTracker.cpp @@ -273,6 +273,12 @@ void DdeFaceTracker::decodePacket(const QByteArray& buffer) { _coefficients[_rightEyeOpenIndex] = RELAXED_EYE_VALUE - rightEye; } + // Use BrowsU_C to control both brows' up and down + _coefficients[_browDownLeftIndex] = -_coefficients[_browUpCenterIndex]; + _coefficients[_browDownRightIndex] = -_coefficients[_browUpCenterIndex]; + _coefficients[_browUpLeftIndex] = _coefficients[_browUpCenterIndex]; + _coefficients[_browUpRightIndex] = _coefficients[_browUpCenterIndex]; + // Offset jaw open coefficient static const float JAW_OPEN_THRESHOLD = 0.16f; _coefficients[_jawOpenIndex] = _coefficients[_jawOpenIndex] - JAW_OPEN_THRESHOLD; @@ -290,16 +296,6 @@ void DdeFaceTracker::decodePacket(const QByteArray& buffer) { _previousCoefficients[i] = _coefficients[i]; } - // Postcondition brow coefficients - if (_blendshapeCoefficients[_browUpCenterIndex] > 0) { - _blendshapeCoefficients[_browDownLeftIndex] = 0.0f; - _blendshapeCoefficients[_browDownRightIndex] = 0.0f; - } else { - _blendshapeCoefficients[_browUpCenterIndex] = 0.0f; - _blendshapeCoefficients[_browUpLeftIndex] = 0.0f; - _blendshapeCoefficients[_browUpRightIndex] = 0.0f; - } - } else { qDebug() << "[Error] DDE Face Tracker Decode Error"; }