History

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

stojce committed 12 years ago

Commit 36d21e82 parents 669ab21 ea63f0526 files · +48 −27060Browse files

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

Unified · Split

interface/src/Application.cpp+13−2
@@ -1474,6 +1474,11 @@ void Application::setFullscreen(bool fullscreen) { · 1473 unmodified lines
1474 (_window->windowState() & ~Qt::WindowFullScreen));1474 (_window->windowState() & ~Qt::WindowFullScreen));
1475}1475}
1476 1476
1477void Application::setEnable3DTVMode(bool enable3DTVMode) {
1478 resizeGL(_glWidget->width(),_glWidget->height());
1479}
1480
1481
1477void Application::setRenderVoxels(bool voxelRender) {1482void Application::setRenderVoxels(bool voxelRender) {
1478 _voxelEditSender.setShouldSend(voxelRender);1483 _voxelEditSender.setShouldSend(voxelRender);
1479 if (!voxelRender) {1484 if (!voxelRender) {
@@ -2075,17 +2080,23 @@ void Application::updateMyAvatarLookAtPosition(glm::vec3& lookAtSpot, glm::vec3& · 595 unmodified lines
2075 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);2080 bool showWarnings = Menu::getInstance()->isOptionChecked(MenuOption::PipelineWarnings);
2076 PerformanceWarning warn(showWarnings, "Application::updateMyAvatarLookAtPosition()");2081 PerformanceWarning warn(showWarnings, "Application::updateMyAvatarLookAtPosition()");
2077 2082
2083 const float FAR_AWAY_STARE = TREE_SCALE;
2078 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {2084 if (_myCamera.getMode() == CAMERA_MODE_MIRROR) {
2079 lookAtSpot = _myCamera.getPosition();2085 lookAtSpot = _myCamera.getPosition();
2080 2086
2087 } else if (_mouseHidden) {
2088 // if the mouse cursor is hidden, just look straight ahead
2089 glm::vec3 rayOrigin, rayDirection;
2090 _viewFrustum.computePickRay(0.5f, 0.5f, rayOrigin, rayDirection);
2091 lookAtSpot = rayOrigin + rayDirection * FAR_AWAY_STARE;
2092
2081 } else if (!_lookatTargetAvatar) {2093 } else if (!_lookatTargetAvatar) {
2082 if (_isHoverVoxel) {2094 if (_isHoverVoxel) {
2083 // Look at the hovered voxel2095 // Look at the hovered voxel
2084 lookAtSpot = getMouseVoxelWorldCoordinates(_hoverVoxel);2096 lookAtSpot = getMouseVoxelWorldCoordinates(_hoverVoxel);
2085 2097
2086 } else {2098 } else {
2087 // Just look in direction of the mouse ray2099 // Just look in direction of the mouse ray
2088 const float FAR_AWAY_STARE = TREE_SCALE;
2089 lookAtSpot = lookAtRayOrigin + lookAtRayDirection * FAR_AWAY_STARE;2100 lookAtSpot = lookAtRayOrigin + lookAtRayDirection * FAR_AWAY_STARE;
2090 }2101 }
2091 }2102 }

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