Showing the changes to interface/src/Application.cpp (1 of 48 files). Show all
Unified · Split
| @@ -129,12 +129,12 @@ · 128 unmodified lines | ||
| 129 | 129 | #include <Preferences.h> |
| 130 | 130 | #include <display-plugins/CompositorHelper.h> |
| 131 | 131 | #include <trackers/EyeTracker.h> |
| 132 | − | |
| 132 | +#include <avatars-renderer/ScriptAvatar.h> | |
| 133 | 133 | |
| 134 | 134 | #include "AudioClient.h" |
| 135 | 135 | #include "audio/AudioScope.h" |
| 136 | 136 | #include "avatar/AvatarManager.h" |
| 137 | −#include "avatar/ScriptAvatar.h" | |
| 137 | +#include "avatar/MyHead.h" | |
| 138 | 138 | #include "CrashHandler.h" |
| 139 | 139 | #include "devices/DdeFaceTracker.h" |
| 140 | 140 | #include "devices/Leapmotion.h" |
| @@ -1586,6 +1586,8 @@ Application::Application(int& argc, char** argv, QElapsedTimer& startupTimer, bo · 1445 unmodified lines | ||
| 1586 | 1586 | connect(&domainHandler, &DomainHandler::hostnameChanged, this, &Application::addAssetToWorldMessageClose); |
| 1587 | 1587 | |
| 1588 | 1588 | updateSystemTabletMode(); |
| 1589 | + | |
| 1590 | + connect(&_myCamera, &Camera::modeUpdated, this, &Application::cameraModeChanged); | |
| 1589 | 1591 | } |
| 1590 | 1592 | |
| 1591 | 1593 | void Application::domainConnectionRefused(const QString& reasonMessage, int reasonCodeInt, const QString& extraInfo) { |
| @@ -2191,7 +2193,7 @@ void Application::paintGL() { · 599 unmodified lines | ||
| 2191 | 2193 | _myCamera.setOrientation(glm::quat_cast(camMat)); |
| 2192 | 2194 | } else { |
| 2193 | 2195 | _myCamera.setPosition(myAvatar->getDefaultEyePosition()); |
| 2194 | − _myCamera.setOrientation(myAvatar->getHead()->getCameraOrientation()); | |
| 2196 | + _myCamera.setOrientation(myAvatar->getMyHead()->getCameraOrientation()); | |
| 2195 | 2197 | } |
| 2196 | 2198 | } else if (_myCamera.getMode() == CAMERA_MODE_THIRD_PERSON) { |
| 2197 | 2199 | if (isHMDMode()) { |
| @@ -4082,6 +4084,30 @@ void Application::cycleCamera() { · 1884 unmodified lines | ||
| 4082 | 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 | 4111 | void Application::cameraMenuChanged() { |
| 4086 | 4112 | if (Menu::getInstance()->isOptionChecked(MenuOption::FullscreenMirror)) { |
| 4087 | 4113 | if (_myCamera.getMode() != CAMERA_MODE_MIRROR) { |