Showing the changes to interface/src/Application.cpp (1 of 14 files). Show all
Unified · Split
| @@ -98,6 +98,7 @@ const int MIRROR_VIEW_HEIGHT = 215; · 97 unmodified lines | |||
| 98 | const float MIRROR_FULLSCREEN_DISTANCE = 0.35f; | 98 | const float MIRROR_FULLSCREEN_DISTANCE = 0.35f; |
| 99 | const float MIRROR_REARVIEW_DISTANCE = 0.65f; | 99 | const float MIRROR_REARVIEW_DISTANCE = 0.65f; |
| 100 | const float MIRROR_REARVIEW_BODY_DISTANCE = 2.3f; | 100 | const float MIRROR_REARVIEW_BODY_DISTANCE = 2.3f; |
| 101 | const float MIRROR_FIELD_OF_VIEW = 30.0f; | ||
| 101 | 102 | ||
| 102 | const QString CHECK_VERSION_URL = "http://highfidelity.io/latestVersion.xml"; | 103 | const QString CHECK_VERSION_URL = "http://highfidelity.io/latestVersion.xml"; |
| 103 | const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/hifi.skipversion"; | 104 | const QString SKIP_FILENAME = QStandardPaths::writableLocation(QStandardPaths::DataLocation) + "/hifi.skipversion"; |
| @@ -2688,7 +2689,7 @@ QImage Application::renderAvatarBillboard() { · 2584 unmodified lines | |||
| 2688 | 2689 | ||
| 2689 | glDisable(GL_BLEND); | 2690 | glDisable(GL_BLEND); |
| 2690 | 2691 | ||
| 2691 | const int BILLBOARD_SIZE = 128; | 2692 | const int BILLBOARD_SIZE = 64; |
| 2692 | renderRearViewMirror(QRect(0, _glWidget->height() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true); | 2693 | renderRearViewMirror(QRect(0, _glWidget->height() - BILLBOARD_SIZE, BILLBOARD_SIZE, BILLBOARD_SIZE), true); |
| 2693 | 2694 | ||
| 2694 | QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32); | 2695 | QImage image(BILLBOARD_SIZE, BILLBOARD_SIZE, QImage::Format_ARGB32); |
| @@ -3621,13 +3622,17 @@ void Application::renderCoverageMapsRecursively(CoverageMap* map) { · 926 unmodified lines | |||
| 3621 | void Application::renderRearViewMirror(const QRect& region, bool billboard) { | 3622 | void Application::renderRearViewMirror(const QRect& region, bool billboard) { |
| 3622 | bool eyeRelativeCamera = false; | 3623 | bool eyeRelativeCamera = false; |
| 3623 | if (billboard) { | 3624 | if (billboard) { |
| 3624 | const float BILLBOARD_DISTANCE = 5.0f; | 3625 | _mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW); |
| 3625 | _mirrorCamera.setDistance(BILLBOARD_DISTANCE * _myAvatar->getScale()); | 3626 | _mirrorCamera.setDistance(BILLBOARD_DISTANCE * _myAvatar->getScale()); |
| 3626 | _mirrorCamera.setTargetPosition(_myAvatar->getPosition()); | 3627 | _mirrorCamera.setTargetPosition(_myAvatar->getPosition()); |
| 3628 | |||
| 3627 | } else if (_rearMirrorTools->getZoomLevel() == BODY) { | 3629 | } else if (_rearMirrorTools->getZoomLevel() == BODY) { |
| 3630 | _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); | ||
| 3628 | _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar->getScale()); | 3631 | _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar->getScale()); |
| 3629 | _mirrorCamera.setTargetPosition(_myAvatar->getChestPosition()); | 3632 | _mirrorCamera.setTargetPosition(_myAvatar->getChestPosition()); |
| 3633 | |||
| 3630 | } else { // HEAD zoom level | 3634 | } else { // HEAD zoom level |
| 3635 | _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); | ||
| 3631 | _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale()); | 3636 | _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale()); |
| 3632 | if (_myAvatar->getSkeletonModel().isActive() && _myAvatar->getHead()->getFaceModel().isActive()) { | 3637 | if (_myAvatar->getSkeletonModel().isActive() && _myAvatar->getHead()->getFaceModel().isActive()) { |
| 3633 | // as a hack until we have a better way of dealing with coordinate precision issues, reposition the | 3638 | // as a hack until we have a better way of dealing with coordinate precision issues, reposition the |
| @@ -3639,7 +3644,8 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 5 unmodified lines | |||
| 3639 | _mirrorCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition()); | 3644 | _mirrorCamera.setTargetPosition(_myAvatar->getHead()->calculateAverageEyePosition()); |
| 3640 | } | 3645 | } |
| 3641 | } | 3646 | } |
| 3642 | 3647 | _mirrorCamera.setAspectRatio((float)region.width() / region.height()); | |
| 3648 | |||
| 3643 | _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f))); | 3649 | _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f))); |
| 3644 | _mirrorCamera.update(1.0f/_fps); | 3650 | _mirrorCamera.update(1.0f/_fps); |
| 3645 | 3651 | ||