mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
fix conditional builds without Faceshift
This commit is contained in:
parent
e060693856
commit
b2a99edb2e
2 changed files with 33 additions and 1 deletions
|
@ -19,11 +19,16 @@
|
|||
#include "Menu.h"
|
||||
#include "Util.h"
|
||||
|
||||
#ifdef HAVE_FACESHIFT
|
||||
using namespace fs;
|
||||
#endif
|
||||
|
||||
using namespace std;
|
||||
|
||||
const quint16 FACESHIFT_PORT = 33433;
|
||||
|
||||
#ifdef HAVE_FACESHIFT
|
||||
|
||||
Faceshift::Faceshift() :
|
||||
_tcpEnabled(true),
|
||||
_tcpRetryCount(0),
|
||||
|
@ -72,6 +77,24 @@ bool Faceshift::isActive() const {
|
|||
return (usecTimestampNow() - _lastTrackingStateReceived) < ACTIVE_TIMEOUT_USECS;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
Faceshift::Faceshift() {
|
||||
|
||||
}
|
||||
|
||||
bool Faceshift::isConnectedOrConnecting() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Faceshift::isActive() const {
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_FACESHIFT
|
||||
|
||||
void Faceshift::update() {
|
||||
if (!isActive()) {
|
||||
return;
|
||||
|
@ -260,3 +283,5 @@ void Faceshift::receive(const QByteArray& buffer) {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -15,8 +15,12 @@
|
|||
#include <QTcpSocket>
|
||||
#include <QUdpSocket>
|
||||
|
||||
#ifdef HAVE_FACESHIFT
|
||||
|
||||
#include <fsbinarystream.h>
|
||||
|
||||
#endif
|
||||
|
||||
#include "FaceTracker.h"
|
||||
|
||||
/// Handles interaction with the Faceshift software, which provides head position/orientation and facial features.
|
||||
|
@ -24,7 +28,6 @@ class Faceshift : public FaceTracker {
|
|||
Q_OBJECT
|
||||
|
||||
public:
|
||||
|
||||
Faceshift();
|
||||
|
||||
void init();
|
||||
|
@ -32,6 +35,8 @@ public:
|
|||
bool isConnectedOrConnecting() const;
|
||||
|
||||
bool isActive() const;
|
||||
|
||||
#ifdef HAVE_FACESHIFT
|
||||
|
||||
const glm::vec3& getHeadAngularVelocity() const { return _headAngularVelocity; }
|
||||
|
||||
|
@ -123,6 +128,8 @@ private:
|
|||
float _longTermAverageEyePitch;
|
||||
float _longTermAverageEyeYaw;
|
||||
bool _longTermAverageInitialized;
|
||||
|
||||
#endif // HAVE_FACESHIFT
|
||||
};
|
||||
|
||||
#endif // hifi_Faceshift_h
|
||||
|
|
Loading…
Reference in a new issue