- shrink function - restore mirror window view and set forward fullscreen view
Showing the changes to interface/src/Application.cpp (1 of 4 files). Show all
Unified · Split
| @@ -453,12 +453,14 @@ void Application::paintGL() { · 452 unmodified lines | |||
| 453 | displaySide(_mirrorCamera, selfAvatarOnly); | 453 | displaySide(_mirrorCamera, selfAvatarOnly); |
| 454 | glPopMatrix(); | 454 | glPopMatrix(); |
| 455 | 455 | ||
| 456 | _rearMirrorTools->render(); | 456 | _rearMirrorTools->render(false); |
| 457 | 457 | ||
| 458 | // reset Viewport and projection matrix | 458 | // reset Viewport and projection matrix |
| 459 | glViewport(0, 0, _glWidget->width(), _glWidget->height()); | 459 | glViewport(0, 0, _glWidget->width(), _glWidget->height()); |
| 460 | glDisable(GL_SCISSOR_TEST); | 460 | glDisable(GL_SCISSOR_TEST); |
| 461 | updateProjectionMatrix(_myCamera, updateViewFrustum); | 461 | updateProjectionMatrix(_myCamera, updateViewFrustum); |
| 462 | } else if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { | ||
| 463 | _rearMirrorTools->render(true); | ||
| 462 | } | 464 | } |
| 463 | 465 | ||
| 464 | displayOverlay(); | 466 | displayOverlay(); |
| @@ -1721,19 +1723,35 @@ void Application::init() { · 1256 unmodified lines | |||
| 1721 | _rearMirrorTools = new RearMirrorTools(_glWidget, _mirrorViewRect); | 1723 | _rearMirrorTools = new RearMirrorTools(_glWidget, _mirrorViewRect); |
| 1722 | connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView())); | 1724 | connect(_rearMirrorTools, SIGNAL(closeView()), SLOT(closeMirrorView())); |
| 1723 | connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView())); | 1725 | connect(_rearMirrorTools, SIGNAL(restoreView()), SLOT(restoreMirrorView())); |
| 1726 | connect(_rearMirrorTools, SIGNAL(shrinkView()), SLOT(shrinkMirrorView())); | ||
| 1724 | } | 1727 | } |
| 1725 | 1728 | ||
| 1726 | void Application::closeMirrorView() { | 1729 | void Application::closeMirrorView() { |
| 1727 | Menu::getInstance()->triggerOption(MenuOption::Mirror); | 1730 | if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { |
| 1731 | Menu::getInstance()->triggerOption(MenuOption::Mirror);; | ||
| 1732 | } | ||
| 1728 | } | 1733 | } |
| 1729 | 1734 | ||
| 1730 | void Application::restoreMirrorView() { | 1735 | void Application::restoreMirrorView() { |
| 1731 | Menu::getInstance()->triggerOption(MenuOption::Mirror); | 1736 | if (Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { |
| 1737 | Menu::getInstance()->triggerOption(MenuOption::Mirror);; | ||
| 1738 | } | ||
| 1739 | |||
| 1732 | if (!Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { | 1740 | if (!Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { |
| 1733 | Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror); | 1741 | Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror); |
| 1734 | } | 1742 | } |
| 1735 | } | 1743 | } |
| 1736 | 1744 | ||
| 1745 | void Application::shrinkMirrorView() { | ||
| 1746 | if (!Menu::getInstance()->isOptionChecked(MenuOption::Mirror)) { | ||
| 1747 | Menu::getInstance()->triggerOption(MenuOption::Mirror);; | ||
| 1748 | } | ||
| 1749 | |||
| 1750 | if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { | ||
| 1751 | Menu::getInstance()->triggerOption(MenuOption::FullscreenMirror); | ||
| 1752 | } | ||
| 1753 | } | ||
| 1754 | |||
| 1737 | const float MAX_AVATAR_EDIT_VELOCITY = 1.0f; | 1755 | const float MAX_AVATAR_EDIT_VELOCITY = 1.0f; |
| 1738 | const float MAX_VOXEL_EDIT_DISTANCE = 20.0f; | 1756 | const float MAX_VOXEL_EDIT_DISTANCE = 20.0f; |
| 1739 | const float HEAD_SPHERE_RADIUS = 0.07; | 1757 | const float HEAD_SPHERE_RADIUS = 0.07; |