overte/interface/src/devices/LeapManager.h
2013-11-19 15:10:02 -08:00

44 lines
1.3 KiB
C++
Executable file

//
// LeapManager.h
// hifi
//
// Created by Eric Johnston on 6/26/13.
// Copyright (c) 2013 High Fidelity, Inc. All rights reserved.
//
#ifndef __hifi__LeapManager__
#define __hifi__LeapManager__
#include <vector>
#include <glm/glm.hpp>
#include <string>
class Avatar;
class HifiLeapListener;
namespace Leap {
class Controller;
}
class LeapManager {
public:
static void nextFrame(); // called once per frame to get new Leap data
static bool controllersExist(); // Returns true if there's at least one active Leap plugged in
static void enableFakeFingers(bool enable); // put fake data in if there's no Leap plugged in
static const std::vector<glm::vec3>& getFingerTips();
static const std::vector<glm::vec3>& getFingerRoots();
static const std::vector<glm::vec3>& getHandPositions();
static const std::vector<glm::vec3>& getHandNormals();
static std::string statusString();
static void initialize();
static void reset();
static void terminate();
private:
static bool _libraryExists; // The library is present, so we won't crash if we call it.
static bool _doFakeFingers;
static Leap::Controller* _controller;
static HifiLeapListener* _listener;
static glm::vec3 _baseDrivePosition;
};
#endif /* defined(__hifi__LeapManager__) */