mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 06:44:06 +02:00
Merge branch 'master' of https://github.com/worklist/hifi into blendface
This commit is contained in:
commit
7d14aaeea4
2 changed files with 5 additions and 5 deletions
|
@ -20,7 +20,7 @@ const quint16 FACESHIFT_PORT = 33433;
|
|||
|
||||
Faceshift::Faceshift() :
|
||||
_tcpEnabled(false),
|
||||
_lastMessageReceived(0),
|
||||
_lastTrackingStateReceived(0),
|
||||
_eyeGazeLeftPitch(0.0f),
|
||||
_eyeGazeLeftYaw(0.0f),
|
||||
_eyeGazeRightPitch(0.0f),
|
||||
|
@ -53,8 +53,7 @@ Faceshift::Faceshift() :
|
|||
|
||||
bool Faceshift::isActive() const {
|
||||
const uint64_t ACTIVE_TIMEOUT_USECS = 1000000;
|
||||
return (_tcpSocket.state() == QAbstractSocket::ConnectedState ||
|
||||
(usecTimestampNow() - _lastMessageReceived) < ACTIVE_TIMEOUT_USECS) && _tracking;
|
||||
return (usecTimestampNow() - _lastTrackingStateReceived) < ACTIVE_TIMEOUT_USECS;
|
||||
}
|
||||
|
||||
void Faceshift::update() {
|
||||
|
@ -153,6 +152,8 @@ void Faceshift::receive(const QByteArray& buffer) {
|
|||
_eyeGazeRightPitch = -data.m_eyeGazeRightPitch;
|
||||
_eyeGazeRightYaw = data.m_eyeGazeRightYaw;
|
||||
_blendshapeCoefficients = data.m_coeffs;
|
||||
|
||||
_lastTrackingStateReceived = usecTimestampNow();
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -202,5 +203,4 @@ void Faceshift::receive(const QByteArray& buffer) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
_lastMessageReceived = usecTimestampNow();
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ private:
|
|||
fs::fsBinaryStream _stream;
|
||||
bool _tcpEnabled;
|
||||
bool _tracking;
|
||||
uint64_t _lastMessageReceived;
|
||||
uint64_t _lastTrackingStateReceived;
|
||||
|
||||
glm::quat _headRotation;
|
||||
glm::vec3 _headTranslation;
|
||||
|
|
Loading…
Reference in a new issue