History

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

atlante45 committed 13 years ago

Commit 8c112cb2 parents 1b4cdc0 6f42bfb4 files · +48 −28Browse files

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

Unified · Split

interface/src/Application.cpp+16−10
@@ -933,7 +933,7 @@ void Application::mouseMoveEvent(QMouseEvent* event) { · 932 unmodified lines
933 933
934const bool MAKE_SOUND_ON_VOXEL_HOVER = false;934const bool MAKE_SOUND_ON_VOXEL_HOVER = false;
935const bool MAKE_SOUND_ON_VOXEL_CLICK = true;935const bool MAKE_SOUND_ON_VOXEL_CLICK = true;
936const float HOVER_VOXEL_FREQUENCY = 14080.f;936const float HOVER_VOXEL_FREQUENCY = 7040.f;
937const float HOVER_VOXEL_DECAY = 0.999f;937const float HOVER_VOXEL_DECAY = 0.999f;
938 938
939void Application::mousePressEvent(QMouseEvent* event) {939void Application::mousePressEvent(QMouseEvent* event) {
@@ -2249,15 +2249,21 @@ void Application::update(float deltaTime) { · 1309 unmodified lines
2249 // If we have clicked on a voxel, update it's color2249 // If we have clicked on a voxel, update it's color
2250 if (_isHoverVoxelSounding) {2250 if (_isHoverVoxelSounding) {
2251 VoxelNode* hoveredNode = _voxels.getVoxelAt(_hoverVoxel.x, _hoverVoxel.y, _hoverVoxel.z, _hoverVoxel.s);2251 VoxelNode* hoveredNode = _voxels.getVoxelAt(_hoverVoxel.x, _hoverVoxel.y, _hoverVoxel.z, _hoverVoxel.s);
2252 float bright = _audio.getCollisionSoundMagnitude();2252 if (hoveredNode) {
2253 nodeColor clickColor = { 255 * bright + _hoverVoxelOriginalColor[0] * (1.f - bright),2253 float bright = _audio.getCollisionSoundMagnitude();
2254 _hoverVoxelOriginalColor[1] * (1.f - bright),2254 nodeColor clickColor = { 255 * bright + _hoverVoxelOriginalColor[0] * (1.f - bright),
2255 _hoverVoxelOriginalColor[2] * (1.f - bright), 1 };2255 _hoverVoxelOriginalColor[1] * (1.f - bright),
2256 hoveredNode->setColor(clickColor);2256 _hoverVoxelOriginalColor[2] * (1.f - bright), 1 };
2257 if (bright < 0.01f) {2257 hoveredNode->setColor(clickColor);
2258 hoveredNode->setColor(_hoverVoxelOriginalColor);2258 if (bright < 0.01f) {
2259 hoveredNode->setColor(_hoverVoxelOriginalColor);
2260 _isHoverVoxelSounding = false;
2261 }
2262 } else {
2263 // Voxel is not found, clear all
2259 _isHoverVoxelSounding = false;2264 _isHoverVoxelSounding = false;
2260 } 2265 _isHoverVoxel = false;
2266 }
2261 } else {2267 } else {
2262 // Check for a new hover voxel2268 // Check for a new hover voxel
2263 glm::vec4 oldVoxel(_hoverVoxel.x, _hoverVoxel.y, _hoverVoxel.z, _hoverVoxel.s);2269 glm::vec4 oldVoxel(_hoverVoxel.x, _hoverVoxel.y, _hoverVoxel.z, _hoverVoxel.s);
@@ -2938,7 +2944,7 @@ void Application::displaySide(Camera& whichCamera) { · 674 unmodified lines
2938 }2944 }
2939 2945
2940 // Render the world box2946 // Render the world box
2941 if (!_lookingInMirror->isChecked() && _renderStatsOn->isChecked()) { render_world_box(); }2947 if (!_lookingInMirror->isChecked() && _renderStatsOn->isChecked()) { renderWorldBox(); }
2942 2948
2943 // brad's frustum for debugging2949 // brad's frustum for debugging
2944 if (_frustumOn->isChecked()) renderViewFrustum(_viewFrustum);2950 if (_frustumOn->isChecked()) renderViewFrustum(_viewFrustum);

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