History

Merge branch 'master' of https://github.com/worklist/hifi into shadowplay

Andrzej Kapolka committed 12 years ago

Commit f38e74c2 parents 3cf47f8 f116fba17 files · +335 −28Browse files

Showing the changes to interface/src/Application.cpp (1 of 17 files). Show all

Unified · Split

interface/src/Application.cpp+13−2
@@ -2192,8 +2192,10 @@ void Application::updateHandAndTouch(float deltaTime) { · 2191 unmodified lines
21922192 float TOUCH_YAW_SCALE = -0.25f;
21932193 float TOUCH_PITCH_SCALE = -12.5f;
21942194 float FIXED_TOUCH_TIMESTEP = 0.016f;
2195+ const float MAX_PITCH = 90.0f;
21952196 _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);
21972199 _lastTouchAvgX = _touchAvgX;
21982200 _lastTouchAvgY = _touchAvgY;
21992201 }
@@ -2205,7 +2207,14 @@ void Application::updateLeap(float deltaTime) { · 5 unmodified lines
22052207
22062208 LeapManager::enableFakeFingers(Menu::getInstance()->isOptionChecked(MenuOption::SimulateLeapHand));
22072209 _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();
22092218 }
22102219
22112220 void Application::updateSerialDevices(float deltaTime) {
@@ -2415,6 +2424,7 @@ void Application::update(float deltaTime) { · 203 unmodified lines
24152424 updateMouseVoxels(deltaTime, mouseRayOrigin, mouseRayDirection, distance, face); // UI/UX related to voxels
24162425 updateHandAndTouch(deltaTime); // Update state for touch sensors
24172426 updateLeap(deltaTime); // Leap finger-sensing device
2427+ updateSixense(); // Razer Hydra controllers
24182428 updateSerialDevices(deltaTime); // Read serial port interface devices
24192429 updateAvatar(deltaTime); // Sample hardware, update view frustum if needed, and send avatar data to mixer/nodes
24202430 updateThreads(deltaTime); // If running non-threaded, then give the threads some time to process...
@@ -4195,6 +4205,7 @@ void Application::resetSensors() { · 1774 unmodified lines
41954205 }
41964206 _webcam.reset();
41974207 _faceshift.reset();
4208+ LeapManager::reset();
41984209 QCursor::setPos(_headMouseX, _headMouseY);
41994210 _myAvatar.reset();
42004211 _myTransmitter.resetLevels();

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t