Showing the changes to interface/src/Application.cpp (1 of 36 files). Show all
Unified · Split
| @@ -87,6 +87,8 @@ · 86 unmodified lines | ||
| 87 | 87 | #include "ui/Stats.h" |
| 88 | 88 | #include "ui/TextRenderer.h" |
| 89 | 89 | |
| 90 | +#include "devices/Leapmotion.h" | |
| 91 | + | |
| 90 | 92 | using namespace std; |
| 91 | 93 | |
| 92 | 94 | // Starfield information |
| @@ -1674,6 +1676,10 @@ void Application::init() { · 1581 unmodified lines | ||
| 1674 | 1676 | _faceplus.init(); |
| 1675 | 1677 | _visage.init(); |
| 1676 | 1678 | |
| 1679 | + Leapmotion* leap = new Leapmotion(); | |
| 1680 | + int index = DeviceTracker::registerDevice( "Leapmotion", leap ); | |
| 1681 | + // _leapmotion.init(); | |
| 1682 | + | |
| 1677 | 1683 | // fire off an immediate domain-server check in now that settings are loaded |
| 1678 | 1684 | NodeList::getInstance()->sendDomainServerCheckIn(); |
| 1679 | 1685 | |
| @@ -2011,6 +2017,9 @@ void Application::update(float deltaTime) { · 331 unmodified lines | ||
| 2011 | 2017 | |
| 2012 | 2018 | updateLOD(); |
| 2013 | 2019 | updateMouseRay(); // check what's under the mouse and update the mouse voxel |
| 2020 | + | |
| 2021 | + DeviceTracker::updateAll(); | |
| 2022 | + | |
| 2014 | 2023 | updateFaceshift(); |
| 2015 | 2024 | updateVisage(); |
| 2016 | 2025 | |
| @@ -2024,6 +2033,7 @@ void Application::update(float deltaTime) { · 7 unmodified lines | ||
| 2024 | 2033 | _sixenseManager.update(deltaTime); |
| 2025 | 2034 | _joystickManager.update(); |
| 2026 | 2035 | _prioVR.update(deltaTime); |
| 2036 | + | |
| 2027 | 2037 | } |
| 2028 | 2038 | |
| 2029 | 2039 | { |
| @@ -2031,6 +2041,10 @@ void Application::update(float deltaTime) { · 1 unmodified line | ||
| 2031 | 2041 | updateMyAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes |
| 2032 | 2042 | } |
| 2033 | 2043 | |
| 2044 | + | |
| 2045 | + // Dispatch input events | |
| 2046 | + _controllerScriptingInterface.updateInputControllers(); | |
| 2047 | + | |
| 2034 | 2048 | updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process... |
| 2035 | 2049 | |
| 2036 | 2050 | { |
| @@ -3139,6 +3153,7 @@ void Application::resetSensors() { · 1102 unmodified lines | ||
| 3139 | 3153 | } |
| 3140 | 3154 | |
| 3141 | 3155 | _prioVR.reset(); |
| 3156 | + //_leapmotion.reset(); | |
| 3142 | 3157 | |
| 3143 | 3158 | QCursor::setPos(_mouseX, _mouseY); |
| 3144 | 3159 | _myAvatar->reset(); |