Showing the changes to interface/src/Application.cpp (1 of 10 files). Show all
Unified · Split
| @@ -454,7 +454,7 @@ void Application::paintGL() { · 453 unmodified lines | |||
| 454 | bool eyeRelativeCamera = false; | 454 | bool eyeRelativeCamera = false; |
| 455 | if (_rearMirrorTools->getZoomLevel() == BODY) { | 455 | if (_rearMirrorTools->getZoomLevel() == BODY) { |
| 456 | _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar.getScale()); | 456 | _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar.getScale()); |
| 457 | _mirrorCamera.setTargetPosition(_myAvatar.getChestJointPosition()); | 457 | _mirrorCamera.setTargetPosition(_myAvatar.getChestPosition()); |
| 458 | } else { // HEAD zoom level | 458 | } else { // HEAD zoom level |
| 459 | _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar.getScale()); | 459 | _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar.getScale()); |
| 460 | if (_myAvatar.getSkeletonModel().isActive() && _myAvatar.getHead().getFaceModel().isActive()) { | 460 | if (_myAvatar.getSkeletonModel().isActive() && _myAvatar.getHead().getFaceModel().isActive()) { |
| @@ -2349,7 +2349,7 @@ void Application::updateTransmitter(float deltaTime) { · 1888 unmodified lines | |||
| 2349 | 2349 | ||
| 2350 | // no transmitter drive implies transmitter pick | 2350 | // no transmitter drive implies transmitter pick |
| 2351 | if (!Menu::getInstance()->isOptionChecked(MenuOption::TransmitterDrive) && _myTransmitter.isConnected()) { | 2351 | if (!Menu::getInstance()->isOptionChecked(MenuOption::TransmitterDrive) && _myTransmitter.isConnected()) { |
| 2352 | _transmitterPickStart = _myAvatar.getChestJointPosition(); | 2352 | _transmitterPickStart = _myAvatar.getChestPosition(); |
| 2353 | glm::vec3 direction = _myAvatar.getOrientation() * | 2353 | glm::vec3 direction = _myAvatar.getOrientation() * |
| 2354 | glm::quat(glm::radians(_myTransmitter.getEstimatedRotation())) * IDENTITY_FRONT; | 2354 | glm::quat(glm::radians(_myTransmitter.getEstimatedRotation())) * IDENTITY_FRONT; |
| 2355 | 2355 | ||
| @@ -2973,7 +2973,6 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 617 unmodified lines | |||
| 2973 | glEnable(GL_DEPTH_TEST); | 2973 | glEnable(GL_DEPTH_TEST); |
| 2974 | 2974 | ||
| 2975 | // Enable to show line from me to the voxel I am touching | 2975 | // Enable to show line from me to the voxel I am touching |
| 2976 | //renderLineToTouchedVoxel(); | ||
| 2977 | //renderThrustAtVoxel(_voxelThrust); | 2976 | //renderThrustAtVoxel(_voxelThrust); |
| 2978 | 2977 | ||
| 2979 | if (!selfAvatarOnly) { | 2978 | if (!selfAvatarOnly) { |
| @@ -3544,20 +3543,6 @@ void Application::renderThrustAtVoxel(const glm::vec3& thrust) { · 564 unmodified lines | |||
| 3544 | } | 3543 | } |
| 3545 | } | 3544 | } |
| 3546 | 3545 | ||
| 3547 | void Application::renderLineToTouchedVoxel() { | ||
| 3548 | // Draw a teal line to the voxel I am currently dragging on | ||
| 3549 | if (_mousePressed) { | ||
| 3550 | glColor3f(0, 1, 1); | ||
| 3551 | glLineWidth(2.0f); | ||
| 3552 | glBegin(GL_LINES); | ||
| 3553 | glm::vec3 voxelTouched = getMouseVoxelWorldCoordinates(_mouseVoxelDragging); | ||
| 3554 | glVertex3f(voxelTouched.x, voxelTouched.y, voxelTouched.z); | ||
| 3555 | glm::vec3 headPosition = _myAvatar.getHeadJointPosition(); | ||
| 3556 | glVertex3fv(&headPosition.x); | ||
| 3557 | glEnd(); | ||
| 3558 | } | ||
| 3559 | } | ||
| 3560 | |||
| 3561 | 3546 | ||
| 3562 | glm::vec2 Application::getScaledScreenPoint(glm::vec2 projectedPoint) { | 3547 | glm::vec2 Application::getScaledScreenPoint(glm::vec2 projectedPoint) { |
| 3563 | float horizontalScale = _glWidget->width() / 2.0f; | 3548 | float horizontalScale = _glWidget->width() / 2.0f; |