Showing the changes to interface/src/Application.cpp (1 of 48 files). Show all
Unified · Split
| @@ -129,12 +129,12 @@ · 128 unmodified lines | |||
| 129 | #include <Preferences.h> | 129 | #include <Preferences.h> |
| 130 | #include <display-plugins/CompositorHelper.h> | 130 | #include <display-plugins/CompositorHelper.h> |
| 131 | #include <trackers/EyeTracker.h> | 131 | #include <trackers/EyeTracker.h> |
| 132 | 132 | #include <avatars-renderer/ScriptAvatar.h> | |
| 133 | 133 | ||
| 134 | #include "AudioClient.h" | 134 | #include "AudioClient.h" |
| 135 | #include "audio/AudioScope.h" | 135 | #include "audio/AudioScope.h" |
| 136 | #include "avatar/AvatarManager.h" | 136 | #include "avatar/AvatarManager.h" |
| 137 | #include "avatar/ScriptAvatar.h" | 137 | #include "avatar/MyHead.h" |
| 138 | #include "CrashHandler.h" | 138 | #include "CrashHandler.h" |
| 139 | #include "devices/DdeFaceTracker.h" | 139 | #include "devices/DdeFaceTracker.h" |
| 140 | #include "devices/Leapmotion.h" | 140 | #include "devices/Leapmotion.h" |
| @@ -1586,6 +1586,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1445 unmodified lines | |||
| 1586 | connect(&domainHandler, &DomainHandler::hostnameChanged, this, &Application::addAssetToWorldMessageClose); | 1586 | connect(&domainHandler, &DomainHandler::hostnameChanged, this, &Application::addAssetToWorldMessageClose); |
| 1587 | 1587 | ||
| 1588 | updateSystemTabletMode(); | 1588 | updateSystemTabletMode(); |
| 1589 | |||
| 1590 | connect(&_myCamera, &Camera::modeUpdated, this, &Application::cameraModeChanged); | ||
| 1589 | } | 1591 | } |
| 1590 | 1592 | ||
| 1591 | void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) { | 1593 | void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) { |
| @@ -2191,7 +2193,7 @@ void Application::paintGL() { · 599 unmodified lines | |||
| 2191 | _myCamera.setOrientation(glm::quat_cast(camMat)); | 2193 | _myCamera.setOrientation(glm::quat_cast(camMat)); |
| 2192 | } else { | 2194 | } else { |
| 2193 | _myCamera.setPosition(myAvatar->getDefaultEyePosition()); | 2195 | _myCamera.setPosition(myAvatar->getDefaultEyePosition()); |
| 2194 | _myCamera.setOrientation(myAvatar->getHead()->getCameraOrientation()); | 2196 | _myCamera.setOrientation(myAvatar->getMyHead()->getCameraOrientation()); |
| 2195 | } | 2197 | } |
| 2196 | } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { | 2198 | } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { |
| 2197 | if (isHMDMode()) { | 2199 | if (isHMDMode()) { |
| @@ -4082,6 +4084,30 @@ void Application::cycleCamera() { · 1884 unmodified lines | |||
| 4082 | cameraMenuChanged(); // handle the menu change | 4084 | cameraMenuChanged(); // handle the menu change |
| 4083 | } | 4085 | } |
| 4084 | 4086 | ||
| 4087 | void Application::cameraModeChanged() { | ||
| 4088 | switch (_myCamera.getMode()) { | ||
| 4089 | case CAMERA_MODE_FIRST_PERSON: | ||
| 4090 | Menu::getInstance()->setIsOptionChecked(MenuOption::FirstPerson, true); | ||
| 4091 | break; | ||
| 4092 | case CAMERA_MODE_THIRD_PERSON: | ||
| 4093 | Menu::getInstance()->setIsOptionChecked(MenuOption::ThirdPerson, true); | ||
| 4094 | break; | ||
| 4095 | case CAMERA_MODE_MIRROR: | ||
| 4096 | Menu::getInstance()->setIsOptionChecked(MenuOption::FullscreenMirror, true); | ||
| 4097 | break; | ||
| 4098 | case CAMERA_MODE_INDEPENDENT: | ||
| 4099 | Menu::getInstance()->setIsOptionChecked(MenuOption::IndependentMode, true); | ||
| 4100 | break; | ||
| 4101 | case CAMERA_MODE_ENTITY: | ||
| 4102 | Menu::getInstance()->setIsOptionChecked(MenuOption::CameraEntityMode, true); | ||
| 4103 | break; | ||
| 4104 | default: | ||
| 4105 | break; | ||
| 4106 | } | ||
| 4107 | cameraMenuChanged(); | ||
| 4108 | } | ||
| 4109 | |||
| 4110 | |||
| 4085 | void Application::cameraMenuChanged() { | 4111 | void Application::cameraMenuChanged() { |
| 4086 | if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { | 4112 | if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { |
| 4087 | if (_myCamera.getMode() != CAMERA_MODE_MIRROR) { | 4113 | if (_myCamera.getMode() != CAMERA_MODE_MIRROR) { |