Showing the changes to interface/src/Application.cpp (1 of 17 files). Show all
Unified · Split
| @@ -2192,8 +2192,10 @@ void Application::updateHandAndTouch(float deltaTime) { · 2191 unmodified lines | ||
| 2192 | 2192 | float TOUCH_YAW_SCALE = -0.25f; |
| 2193 | 2193 | float TOUCH_PITCH_SCALE = -12.5f; |
| 2194 | 2194 | float FIXED_TOUCH_TIMESTEP = 0.016f; |
| 2195 | + const float MAX_PITCH = 90.0f; | |
| 2195 | 2196 | _yawFromTouch += ((_touchAvgX - _lastTouchAvgX) * TOUCH_YAW_SCALE * FIXED_TOUCH_TIMESTEP); |
| 2196 | − _pitchFromTouch += ((_touchAvgY - _lastTouchAvgY) * TOUCH_PITCH_SCALE * FIXED_TOUCH_TIMESTEP); | |
| 2197 | + _pitchFromTouch = glm::clamp(_pitchFromTouch + (_touchAvgY - _lastTouchAvgY) * TOUCH_PITCH_SCALE * | |
| 2198 | + FIXED_TOUCH_TIMESTEP, -MAX_PITCH, MAX_PITCH); | |
| 2197 | 2199 | _lastTouchAvgX = _touchAvgX; |
| 2198 | 2200 | _lastTouchAvgY = _touchAvgY; |
| 2199 | 2201 | } |
| @@ -2205,7 +2207,14 @@ void Application::updateLeap(float deltaTime) { · 5 unmodified lines | ||
| 2205 | 2207 | |
| 2206 | 2208 | LeapManager::enableFakeFingers(Menu::getInstance()->isOptionChecked(MenuOption::SimulateLeapHand)); |
| 2207 | 2209 | _myAvatar.getHand().setRaveGloveActive(Menu::getInstance()->isOptionChecked(MenuOption::TestRaveGlove)); |
| 2208 | − LeapManager::nextFrame(_myAvatar); | |
| 2210 | + LeapManager::nextFrame(); | |
| 2211 | +} | |
| 2212 | + | |
| 2213 | +void Application::updateSixense() { | |
| 2214 | + bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings); | |
| 2215 | + PerformanceWarning warn(showWarnings, "Application::updateSixense()"); | |
| 2216 | + | |
| 2217 | + _sixenseManager.update(); | |
| 2209 | 2218 | } |
| 2210 | 2219 | |
| 2211 | 2220 | void Application::updateSerialDevices(float deltaTime) { |
| @@ -2415,6 +2424,7 @@ void Application::update(float deltaTime) { · 203 unmodified lines | ||
| 2415 | 2424 | updateMouseVoxels(deltaTime, mouseRayOrigin, mouseRayDirection, distance, face); // UI/UX related to voxels |
| 2416 | 2425 | updateHandAndTouch(deltaTime); // Update state for touch sensors |
| 2417 | 2426 | updateLeap(deltaTime); // Leap finger-sensing device |
| 2427 | + updateSixense(); // Razer Hydra controllers | |
| 2418 | 2428 | updateSerialDevices(deltaTime); // Read serial port interface devices |
| 2419 | 2429 | updateAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes |
| 2420 | 2430 | updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process... |
| @@ -4195,6 +4205,7 @@ void Application::resetSensors() { · 1774 unmodified lines | ||
| 4195 | 4205 | } |
| 4196 | 4206 | _webcam.reset(); |
| 4197 | 4207 | _faceshift.reset(); |
| 4208 | + LeapManager::reset(); | |
| 4198 | 4209 | QCursor::setPos(_headMouseX, _headMouseY); |
| 4199 | 4210 | _myAvatar.reset(); |
| 4200 | 4211 | _myTransmitter.resetLevels(); |