From 597c57a11740b529d80bded8a692ad9f05aa4d40 Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Mon, 9 Sep 2013 12:17:12 -0700 Subject: [PATCH] Revert "Try using the eye coefficients rather than the eye directions reported by" This reverts commit 37aa90932237b981e9e00730afd73daf1d82e4a4. --- interface/src/devices/Faceshift.cpp | 45 +---------------------------- interface/src/devices/Faceshift.h | 10 ------- 2 files changed, 1 insertion(+), 54 deletions(-) diff --git a/interface/src/devices/Faceshift.cpp b/interface/src/devices/Faceshift.cpp index 5e35d23415..4418d19223 100644 --- a/interface/src/devices/Faceshift.cpp +++ b/interface/src/devices/Faceshift.cpp @@ -26,11 +26,7 @@ Faceshift::Faceshift() : _browHeight(0.0f), _browUpCenterIndex(-1), _mouthSize(0.0f), - _jawOpenIndex(-1), - _leftEyeUpIndex(-1), - _leftEyeInIndex(-1), - _rightEyeUpIndex(-1), - _rightEyeInIndex(-1) + _jawOpenIndex(-1) { connect(&_socket, SIGNAL(connected()), SLOT(noteConnected())); connect(&_socket, SIGNAL(error(QAbstractSocket::SocketError)), SLOT(noteError(QAbstractSocket::SocketError))); @@ -112,21 +108,6 @@ void Faceshift::readFromSocket() { if (_jawOpenIndex != -1) { _mouthSize = data.m_coeffs[_jawOpenIndex]; } - const float PITCH_SCALE = 45.0f; - if (_leftEyeUpIndex != -1) { - _eyeGazeLeftPitch = PITCH_SCALE * (data.m_coeffs[_leftEyeUpIndex] - data.m_coeffs[_leftEyeDownIndex]); - } - const float YAW_SCALE = 45.0f; - if (_leftEyeInIndex != -1) { - _eyeGazeLeftYaw = YAW_SCALE * (data.m_coeffs[_leftEyeOutIndex] - data.m_coeffs[_leftEyeInIndex]); - } - if (_rightEyeUpIndex != -1) { - _eyeGazeRightPitch = PITCH_SCALE * (data.m_coeffs[_rightEyeUpIndex] - - data.m_coeffs[_rightEyeDownIndex]); - } - if (_rightEyeInIndex != -1) { - _eyeGazeRightYaw = YAW_SCALE * (data.m_coeffs[_rightEyeInIndex] - data.m_coeffs[_rightEyeOutIndex]); - } } break; } @@ -144,30 +125,6 @@ void Faceshift::readFromSocket() { } else if (names[i] == "JawOpen") { _jawOpenIndex = i; - - } else if (names[i] == "EyeUp_L") { - _leftEyeUpIndex = i; - - } else if (names[i] == "EyeDown_L") { - _leftEyeDownIndex = i; - - } else if (names[i] == "EyeIn_L") { - _leftEyeInIndex = i; - - } else if (names[i] == "EyeOut_L") { - _leftEyeOutIndex = i; - - } else if (names[i] == "EyeUp_R") { - _rightEyeUpIndex = i; - - } else if (names[i] == "EyeDown_R") { - _rightEyeDownIndex = i; - - } else if (names[i] == "EyeIn_R") { - _rightEyeInIndex = i; - - } else if (names[i] == "EyeOut_R") { - _rightEyeOutIndex = i; } } break; diff --git a/interface/src/devices/Faceshift.h b/interface/src/devices/Faceshift.h index 745ce6f099..286a7a56a1 100644 --- a/interface/src/devices/Faceshift.h +++ b/interface/src/devices/Faceshift.h @@ -85,16 +85,6 @@ private: float _mouthSize; int _jawOpenIndex; - - int _leftEyeUpIndex; - int _leftEyeDownIndex; - int _leftEyeInIndex; - int _leftEyeOutIndex; - - int _rightEyeUpIndex; - int _rightEyeDownIndex; - int _rightEyeInIndex; - int _rightEyeOutIndex; }; #endif /* defined(__interface__Faceshift__) */