Fix eye tracker conditional compile

This commit is contained in:
David Rowe 2015-07-29 16:20:45 -07:00
parent f2ae7bfac0
commit 212327dd46
2 changed files with 8 additions and 2 deletions

View file

@ -34,12 +34,12 @@ EyeTracker::~EyeTracker() {
#endif
}
#ifdef HAVE_IVIEWHMD
void EyeTracker::processData(smi_CallbackDataStruct* data) {
if (!_isEnabled) {
return;
}
#ifdef HAVE_IVIEWHMD
if (data->type == SMI_SIMPLE_GAZE_SAMPLE) {
// Calculate the intersections of the left and right eye look-at vectors with a vertical plane along the monocular
// gaze direction. Average these positions to give the look-at point.
@ -91,8 +91,8 @@ void EyeTracker::processData(smi_CallbackDataStruct* data) {
}
}
}
#endif
}
#endif
void EyeTracker::init() {
if (_isInitialized) {
@ -143,6 +143,7 @@ void EyeTracker::reset() {
// Nothing to do.
}
#ifdef HAVE_IVIEWHMD
QString EyeTracker::smiReturnValueToString(int value) {
switch (value)
{
@ -168,3 +169,4 @@ QString EyeTracker::smiReturnValueToString(int value) {
return number;
}
}
#endif

View file

@ -17,7 +17,9 @@
#include <glm/glm.hpp>
#include <DependencyManager.h>
#ifdef HAVE_IVIEWHMD
#include <iViewHMDAPI.h>
#endif
class EyeTracker : public QObject, public Dependency {
@ -32,7 +34,9 @@ public:
glm::vec3 getLookAtPosition() { return _lookAtPosition; } // From mid eye point in head frame.
#ifdef HAVE_IVIEWHMD
void processData(smi_CallbackDataStruct* data);
#endif
public slots:
void init();