mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-10 13:33:31 +02:00
1. Fixed thread-crash at terminate() time by terminating the LeapManager properly 2. Fixed an intermittent thread-crash when Leap active by removing auto-connection between controller and listener 3. Added fingerRoot positions to display and data packet 4. Introduced a vec3-based convention so that more finger data may be added without causing trouble for old clients and servers 5. My avatar's fingers are different color from others
38 lines
1,015 B
C++
Executable file
38 lines
1,015 B
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 HifiLeapListener;
|
|
namespace Leap {
|
|
class Controller;
|
|
}
|
|
|
|
class LeapManager {
|
|
public:
|
|
static void nextFrame(); // called once per frame to get new Leap data
|
|
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 terminate();
|
|
|
|
private:
|
|
static bool _libraryExists; // The library is present, so we won't crash if we call it.
|
|
static Leap::Controller* _controller;
|
|
static HifiLeapListener* _listener;
|
|
};
|
|
|
|
#endif /* defined(__hifi__LeapManager__) */
|