mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-04-12 19:12:36 +02:00
Leap Motion activation
This commit is contained in:
parent
2ca4283828
commit
5de585e320
2 changed files with 26 additions and 0 deletions
|
@ -28,6 +28,10 @@ const char* SENSOR_ON_HMD = "HMD";
|
|||
const char* DEFAULT_SENSOR_LOCATION = SENSOR_ON_DESKTOP;
|
||||
|
||||
void LeapMotionPlugin::pluginUpdate(float deltaTime, const controller::InputCalibrationData& inputCalibrationData) {
|
||||
if (!_enabled) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO
|
||||
}
|
||||
|
||||
|
@ -73,6 +77,21 @@ void LeapMotionPlugin::init() {
|
|||
}
|
||||
}
|
||||
|
||||
bool LeapMotionPlugin::activate() {
|
||||
InputPlugin::activate();
|
||||
|
||||
if (_enabled) {
|
||||
// Nothing required to be done to start up Leap Motion.
|
||||
return true;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
void LeapMotionPlugin::deactivate() {
|
||||
InputPlugin::deactivate();
|
||||
}
|
||||
|
||||
const char* SETTINGS_ENABLED_KEY = "enabled";
|
||||
const char* SETTINGS_SENSOR_LOCATION_KEY = "sensorLocation";
|
||||
|
||||
|
|
|
@ -31,6 +31,9 @@ public:
|
|||
|
||||
virtual void init() override;
|
||||
|
||||
virtual bool activate() override;
|
||||
virtual void deactivate() override;
|
||||
|
||||
virtual void saveSettings() const override;
|
||||
virtual void loadSettings() override;
|
||||
|
||||
|
@ -54,6 +57,10 @@ protected:
|
|||
};
|
||||
|
||||
std::shared_ptr<InputDevice> _inputDevice{ std::make_shared<InputDevice>() };
|
||||
|
||||
private:
|
||||
Leap::Controller _controller;
|
||||
|
||||
};
|
||||
|
||||
#endif // hifi_LeapMotionPlugin_h
|
||||
|
|
Loading…
Reference in a new issue