History

added easier support for calculating multitouch rotating behavior including deltaAngle, isRotating, rotating(direction) properties

ZappoMan committed 12 years ago

Commit dca0b051 parent 3bf8dd85 files · +160 −31Browse files

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

Unified · Split

interface/src/Application.cpp+8−6
@@ -1218,6 +1218,11 @@ void Application::mouseMoveEvent(QMouseEvent* event) { · 1217 unmodified lines
12181218 }
12191219 }
12201220
1221+const bool MAKE_SOUND_ON_VOXEL_HOVER = false;
1222+const bool MAKE_SOUND_ON_VOXEL_CLICK = true;
1223+const float HOVER_VOXEL_FREQUENCY = 7040.f;
1224+const float HOVER_VOXEL_DECAY = 0.999f;
1225+
12211226 void Application::mousePressEvent(QMouseEvent* event) {
12221227 _controllerScriptingInterface.emitMousePressEvent(event); // send events to any registered scripts
12231228
@@ -1320,7 +1325,7 @@ void Application::touchUpdateEvent(QTouchEvent* event) { · 96 unmodified lines
13201325 }
13211326
13221327 void Application::touchBeginEvent(QTouchEvent* event) {
1323− TouchEvent thisEvent(*event, _lastTouchEvent);
1328+ TouchEvent thisEvent(*event); // on touch begin, we don't compare to last event
13241329 _controllerScriptingInterface.emitTouchBeginEvent(thisEvent); // send events to any registered scripts
13251330 touchUpdateEvent(event);
13261331 _lastTouchEvent = thisEvent;
@@ -2007,12 +2012,9 @@ void Application::updateHoverVoxels(float deltaTime, float& distance, BoxFace& f · 680 unmodified lines
20072012 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
20082013 PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels()");
20092014
2010− // Check for a new hover voxel
20112015 if (!_mousePressed) {
2012− {
2013− PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()");
2014− _isHoverVoxel = _voxels.findRayIntersection(_mouseRayOrigin, _mouseRayDirection, _hoverVoxel, distance, face);
2015− }
2016+ PerformanceWarning warn(showWarnings, "Application::updateHoverVoxels() _voxels.findRayIntersection()");
2017+ _isHoverVoxel = _voxels.findRayIntersection(_mouseRayOrigin, _mouseRayDirection, _hoverVoxel, distance, face);
20162018 }
20172019 }
20182020

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