History

use radians instead of degrees (almost) everywhere

Andrew Meadows committed 12 years ago

Commit aa8c2fc1 parent de8165c51 files · +302 −306Browse files

Showing the changes to interface/src/Application.cpp (1 of 51 files). Show all

Unified · Split

interface/src/Application.cpp+60−60
@@ -507,7 +507,7 @@ void Application::paintGL() { · 506 unmodified lines
507507 float headHeight = _myAvatar->getHead()->calculateAverageEyePosition().y - _myAvatar->getPosition().y;
508508 _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale());
509509 _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight, 0));
510− _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));
510+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI, 0.0f)));
511511 }
512512
513513 // Update camera position
@@ -744,7 +744,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 230 unmodified lines
744744 if (!_myAvatar->getDriveKeys(UP)) {
745745 _myAvatar->jump();
746746 }
747− _myAvatar->setDriveKeys(UP, 1);
747+ _myAvatar->setDriveKeys(UP, 1.f);
748748 break;
749749
750750 case Qt::Key_Asterisk:
@@ -752,11 +752,11 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1 unmodified line
752752 break;
753753
754754 case Qt::Key_C:
755− _myAvatar->setDriveKeys(DOWN, 1);
755+ _myAvatar->setDriveKeys(DOWN, 1.f);
756756 break;
757757
758758 case Qt::Key_W:
759− _myAvatar->setDriveKeys(FWD, 1);
759+ _myAvatar->setDriveKeys(FWD, 1.f);
760760 break;
761761
762762 case Qt::Key_S:
@@ -765,7 +765,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 2 unmodified lines
765765 } else if (!isShifted && isMeta) {
766766 takeSnapshot();
767767 } else {
768− _myAvatar->setDriveKeys(BACK, 1);
768+ _myAvatar->setDriveKeys(BACK, 1.f);
769769 }
770770 break;
771771
@@ -783,12 +783,12 @@ void Application::keyPressEvent(QKeyEvent* event) { · 11 unmodified lines
783783 if (isShifted) {
784784 Menu::getInstance()->triggerOption(MenuOption::Atmosphere);
785785 } else {
786− _myAvatar->setDriveKeys(ROT_LEFT, 1);
786+ _myAvatar->setDriveKeys(ROT_LEFT, 1.f);
787787 }
788788 break;
789789
790790 case Qt::Key_D:
791− _myAvatar->setDriveKeys(ROT_RIGHT, 1);
791+ _myAvatar->setDriveKeys(ROT_RIGHT, 1.f);
792792 break;
793793
794794 case Qt::Key_Return:
@@ -800,19 +800,19 @@ void Application::keyPressEvent(QKeyEvent* event) { · 5 unmodified lines
800800 break;
801801
802802 case Qt::Key_Up:
803− _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1);
803+ _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1.f);
804804 break;
805805
806806 case Qt::Key_Down:
807− _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1);
807+ _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1.f);
808808 break;
809809
810810 case Qt::Key_Left:
811− _myAvatar->setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1);
811+ _myAvatar->setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1.f);
812812 break;
813813
814814 case Qt::Key_Right:
815− _myAvatar->setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1);
815+ _myAvatar->setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1.f);
816816 break;
817817
818818 case Qt::Key_I:
@@ -946,47 +946,47 @@ void Application::keyReleaseEvent(QKeyEvent* event) { · 127 unmodified lines
946946
947947 switch (event->key()) {
948948 case Qt::Key_E:
949− _myAvatar->setDriveKeys(UP, 0);
949+ _myAvatar->setDriveKeys(UP, 0.f);
950950 break;
951951
952952 case Qt::Key_C:
953− _myAvatar->setDriveKeys(DOWN, 0);
953+ _myAvatar->setDriveKeys(DOWN, 0.f);
954954 break;
955955
956956 case Qt::Key_W:
957− _myAvatar->setDriveKeys(FWD, 0);
957+ _myAvatar->setDriveKeys(FWD, 0.f);
958958 break;
959959
960960 case Qt::Key_S:
961− _myAvatar->setDriveKeys(BACK, 0);
961+ _myAvatar->setDriveKeys(BACK, 0.f);
962962 break;
963963
964964 case Qt::Key_A:
965− _myAvatar->setDriveKeys(ROT_LEFT, 0);
965+ _myAvatar->setDriveKeys(ROT_LEFT, 0.f);
966966 break;
967967
968968 case Qt::Key_D:
969− _myAvatar->setDriveKeys(ROT_RIGHT, 0);
969+ _myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
970970 break;
971971
972972 case Qt::Key_Up:
973− _myAvatar->setDriveKeys(FWD, 0);
974− _myAvatar->setDriveKeys(UP, 0);
973+ _myAvatar->setDriveKeys(FWD, 0.f);
974+ _myAvatar->setDriveKeys(UP, 0.f);
975975 break;
976976
977977 case Qt::Key_Down:
978− _myAvatar->setDriveKeys(BACK, 0);
979− _myAvatar->setDriveKeys(DOWN, 0);
978+ _myAvatar->setDriveKeys(BACK, 0.f);
979+ _myAvatar->setDriveKeys(DOWN, 0.f);
980980 break;
981981
982982 case Qt::Key_Left:
983− _myAvatar->setDriveKeys(LEFT, 0);
984− _myAvatar->setDriveKeys(ROT_LEFT, 0);
983+ _myAvatar->setDriveKeys(LEFT, 0.f);
984+ _myAvatar->setDriveKeys(ROT_LEFT, 0.f);
985985 break;
986986
987987 case Qt::Key_Right:
988− _myAvatar->setDriveKeys(RIGHT, 0);
989− _myAvatar->setDriveKeys(ROT_RIGHT, 0);
988+ _myAvatar->setDriveKeys(RIGHT, 0.f);
989+ _myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
990990 break;
991991
992992 default:
@@ -1488,7 +1488,7 @@ void Application::init() { · 495 unmodified lines
14881488 3.0f * TREE_SCALE / 2.0f));
14891489 _sharedVoxelSystemViewFrustum.setNearClip(TREE_SCALE / 2.0f);
14901490 _sharedVoxelSystemViewFrustum.setFarClip(3.0f * TREE_SCALE / 2.0f);
1491− _sharedVoxelSystemViewFrustum.setFieldOfView(90);
1491+ _sharedVoxelSystemViewFrustum.setFieldOfView(90.f);
14921492 _sharedVoxelSystemViewFrustum.setOrientation(glm::quat());
14931493 _sharedVoxelSystemViewFrustum.calculate();
14941494 _sharedVoxelSystem.setViewFrustum(&_sharedVoxelSystemViewFrustum);
@@ -2120,7 +2120,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 625 unmodified lines
21202120 void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) {
21212121 // We will use these below, from either the camera or head vectors calculated above
21222122 glm::vec3 position(camera.getPosition());
2123− float fov = camera.getFieldOfView();
2123+ float fov = camera.getFieldOfView(); // degrees
21242124 float nearClip = camera.getNearClip();
21252125 float farClip = camera.getFarClip();
21262126 float aspectRatio = camera.getAspectRatio();
@@ -2133,7 +2133,7 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) { · 6 unmodified lines
21332133
21342134 // Also make sure it's got the correct lens details from the camera
21352135 viewFrustum.setAspectRatio(aspectRatio);
2136− viewFrustum.setFieldOfView(fov);
2136+ viewFrustum.setFieldOfView(fov); // degrees
21372137 viewFrustum.setNearClip(nearClip);
21382138 viewFrustum.setFarClip(farClip);
21392139 viewFrustum.setEyeOffsetPosition(camera.getEyeOffsetPosition());
@@ -2195,7 +2195,7 @@ void Application::updateShadowMap() { · 55 unmodified lines
21952195 glPushMatrix();
21962196 glLoadIdentity();
21972197 glm::vec3 axis = glm::axis(rotation);
2198− glRotatef(glm::angle(rotation), axis.x, axis.y, axis.z);
2198+ glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
21992199
22002200 // store view matrix without translation, which we'll use for precision-sensitive objects
22012201 glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix);
@@ -2274,7 +2274,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 72 unmodified lines
22742274 glm::vec3 eyeOffsetPos = whichCamera.getEyeOffsetPosition();
22752275 glm::quat eyeOffsetOrient = whichCamera.getEyeOffsetOrientation();
22762276 glm::vec3 eyeOffsetAxis = glm::axis(eyeOffsetOrient);
2277− glRotatef(-glm::angle(eyeOffsetOrient), eyeOffsetAxis.x, eyeOffsetAxis.y, eyeOffsetAxis.z);
2277+ glRotatef(-glm::degrees(glm::angle(eyeOffsetOrient)), eyeOffsetAxis.x, eyeOffsetAxis.y, eyeOffsetAxis.z);
22782278 glTranslatef(-eyeOffsetPos.x, -eyeOffsetPos.y, -eyeOffsetPos.z);
22792279
22802280 // transform view according to whichCamera
@@ -2283,7 +2283,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 2 unmodified lines
22832283
22842284 glm::quat rotation = whichCamera.getRotation();
22852285 glm::vec3 axis = glm::axis(rotation);
2286− glRotatef(-glm::angle(rotation), axis.x, axis.y, axis.z);
2286+ glRotatef(-glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
22872287
22882288 // store view matrix without translation, which we'll use for precision-sensitive objects
22892289 glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix);
@@ -2501,7 +2501,7 @@ void Application::displayOverlay() { · 211 unmodified lines
25012501 (Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
25022502 Menu::getInstance()->isOptionChecked(MenuOption::Bandwidth))
25032503 ? 80 : 20;
2504− drawText(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 1.0f, 0, frameTimer, WHITE_TEXT);
2504+ drawText(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 1.0f, 0.f, frameTimer, WHITE_TEXT);
25052505 }
25062506
25072507 _overlays.render2D();
@@ -2556,11 +2556,11 @@ void Application::displayStats() { · 48 unmodified lines
25562556 sprintf(framesPerSecond, "Framerate: %3.0f FPS", _fps);
25572557
25582558 verticalOffset += STATS_PELS_PER_LINE;
2559− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, serverNodes, WHITE_TEXT);
2559+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, serverNodes, WHITE_TEXT);
25602560 verticalOffset += STATS_PELS_PER_LINE;
2561− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarNodes, WHITE_TEXT);
2561+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarNodes, WHITE_TEXT);
25622562 verticalOffset += STATS_PELS_PER_LINE;
2563− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, framesPerSecond, WHITE_TEXT);
2563+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, framesPerSecond, WHITE_TEXT);
25642564
25652565 if (_statsExpanded) {
25662566 char packetsPerSecond[30];
@@ -2569,9 +2569,9 @@ void Application::displayStats() { · 2 unmodified lines
25692569 sprintf(averageMegabitsPerSecond, "Mbps: %3.2f", (float)_bytesPerSecond * 8.f / 1000000.f);
25702570
25712571 verticalOffset += STATS_PELS_PER_LINE;
2572− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, packetsPerSecond, WHITE_TEXT);
2572+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, packetsPerSecond, WHITE_TEXT);
25732573 verticalOffset += STATS_PELS_PER_LINE;
2574− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, averageMegabitsPerSecond, WHITE_TEXT);
2574+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, averageMegabitsPerSecond, WHITE_TEXT);
25752575 }
25762576
25772577 verticalOffset = 0;
@@ -2614,7 +2614,7 @@ void Application::displayStats() { · 36 unmodified lines
26142614 "Buffer msecs %.1f",
26152615 (float) (_audio.getNetworkBufferLengthSamplesPerChannel() + (float) _audio.getJitterBufferSamples()) /
26162616 (float)_audio.getNetworkSampleRate() * 1000.f);
2617− drawText(30, _glWidget->height() - 22, 0.10f, 0, 2, audioJitter, WHITE_TEXT);
2617+ drawText(30, _glWidget->height() - 22, 0.10f, 0.f, 2.f, audioJitter, WHITE_TEXT);
26182618
26192619
26202620 char audioPing[30];
@@ -2627,18 +2627,18 @@ void Application::displayStats() { · 6 unmodified lines
26272627 sprintf(voxelAvgPing, "Voxel avg ping: %d", pingVoxel);
26282628
26292629 verticalOffset += STATS_PELS_PER_LINE;
2630− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, audioPing, WHITE_TEXT);
2630+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, audioPing, WHITE_TEXT);
26312631 verticalOffset += STATS_PELS_PER_LINE;
2632− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPing, WHITE_TEXT);
2632+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarPing, WHITE_TEXT);
26332633 verticalOffset += STATS_PELS_PER_LINE;
2634− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelAvgPing, WHITE_TEXT);
2634+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, voxelAvgPing, WHITE_TEXT);
26352635
26362636 if (_statsExpanded) {
26372637 char voxelMaxPing[30];
26382638 sprintf(voxelMaxPing, "Voxel max ping: %d", pingVoxelMax);
26392639
26402640 verticalOffset += STATS_PELS_PER_LINE;
2641− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelMaxPing, WHITE_TEXT);
2641+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, voxelMaxPing, WHITE_TEXT);
26422642 }
26432643
26442644 verticalOffset = 0;
@@ -2666,11 +2666,11 @@ void Application::displayStats() { · 21 unmodified lines
26662666 char avatarMixerStats[200];
26672667
26682668 verticalOffset += STATS_PELS_PER_LINE;
2669− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPosition, WHITE_TEXT);
2669+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarPosition, WHITE_TEXT);
26702670 verticalOffset += STATS_PELS_PER_LINE;
2671− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarVelocity, WHITE_TEXT);
2671+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarVelocity, WHITE_TEXT);
26722672 verticalOffset += STATS_PELS_PER_LINE;
2673− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarBodyYaw, WHITE_TEXT);
2673+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarBodyYaw, WHITE_TEXT);
26742674
26752675 if (_statsExpanded) {
26762676 SharedNodePointer avatarMixer = NodeList::getInstance()->soloNodeOfType(NodeType::AvatarMixer);
@@ -2683,7 +2683,7 @@ void Application::displayStats() { · 6 unmodified lines
26832683 }
26842684
26852685 verticalOffset += STATS_PELS_PER_LINE;
2686− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarMixerStats, WHITE_TEXT);
2686+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarMixerStats, WHITE_TEXT);
26872687 }
26882688
26892689 verticalOffset = 0;
@@ -2698,7 +2698,7 @@ void Application::displayStats() { · 8 unmodified lines
26982698 voxelStats.str("");
26992699 voxelStats << "Voxels Memory Nodes: " << VoxelTreeElement::getTotalMemoryUsage() / 1000000.f << "MB";
27002700 verticalOffset += STATS_PELS_PER_LINE;
2701− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2701+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27022702
27032703 voxelStats.str("");
27042704 voxelStats <<
@@ -2708,14 +2708,14 @@ void Application::displayStats() { · 3 unmodified lines
27082708 voxelStats << " / GPU: " << _voxels.getVoxelMemoryUsageGPU() / 1000000.f << "MB";
27092709 }
27102710 verticalOffset += STATS_PELS_PER_LINE;
2711− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2711+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27122712
27132713 // Voxel Rendering
27142714 voxelStats.str("");
27152715 voxelStats.precision(4);
27162716 voxelStats << "Voxel Rendering Slots Max: " << _voxels.getMaxVoxels() / 1000.f << "K";
27172717 verticalOffset += STATS_PELS_PER_LINE;
2718− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2718+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27192719 }
27202720
27212721 voxelStats.str("");
@@ -2723,7 +2723,7 @@ void Application::displayStats() { · 1 unmodified line
27232723 voxelStats << "Drawn: " << _voxels.getVoxelsWritten() / 1000.f << "K " <<
27242724 "Abandoned: " << _voxels.getAbandonedVoxels() / 1000.f << "K ";
27252725 verticalOffset += STATS_PELS_PER_LINE;
2726− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2726+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27272727
27282728 // iterate all the current voxel stats, and list their sending modes, and total voxel counts
27292729 std::stringstream sendingMode("");
@@ -2767,7 +2767,7 @@ void Application::displayStats() { · 37 unmodified lines
27672767 sendingMode << " <SCENE STABLE>";
27682768 }
27692769 verticalOffset += STATS_PELS_PER_LINE;
2770− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)sendingMode.str().c_str(), WHITE_TEXT);
2770+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)sendingMode.str().c_str(), WHITE_TEXT);
27712771 }
27722772
27732773 // Incoming packets
@@ -2779,7 +2779,7 @@ void Application::displayStats() { · 5 unmodified lines
27792779 voxelStats << "Voxel Packets to Process: " << packetsString.toLocal8Bit().constData()
27802780 << " [Recent Max: " << maxString.toLocal8Bit().constData() << "]";
27812781 verticalOffset += STATS_PELS_PER_LINE;
2782− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2782+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27832783 }
27842784
27852785 if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) {
@@ -2802,7 +2802,7 @@ void Application::displayStats() { · 16 unmodified lines
28022802 voxelStats.str("");
28032803 voxelStats << "Server voxels: " << serversTotalString.toLocal8Bit().constData();
28042804 verticalOffset += STATS_PELS_PER_LINE;
2805− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2805+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
28062806
28072807 if (_statsExpanded) {
28082808 QString serversInternalString = locale.toString((uint)totalInternal);
@@ -2813,7 +2813,7 @@ void Application::displayStats() { · 4 unmodified lines
28132813 "Internal: " << serversInternalString.toLocal8Bit().constData() << " " <<
28142814 "Leaves: " << serversLeavesString.toLocal8Bit().constData() << "";
28152815 verticalOffset += STATS_PELS_PER_LINE;
2816− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2816+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
28172817 }
28182818
28192819 unsigned long localTotal = VoxelTreeElement::getNodeCount();
@@ -2823,7 +2823,7 @@ void Application::displayStats() { · 3 unmodified lines
28232823 voxelStats.str("");
28242824 voxelStats << "Local voxels: " << localTotalString.toLocal8Bit().constData();
28252825 verticalOffset += STATS_PELS_PER_LINE;
2826− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2826+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
28272827
28282828 if (_statsExpanded) {
28292829 unsigned long localInternal = VoxelTreeElement::getInternalNodeCount();
@@ -2836,7 +2836,7 @@ void Application::displayStats() { · 6 unmodified lines
28362836 "Internal: " << localInternalString.toLocal8Bit().constData() << " " <<
28372837 "Leaves: " << localLeavesString.toLocal8Bit().constData() << "";
28382838 verticalOffset += STATS_PELS_PER_LINE;
2839− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2839+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
28402840 }
28412841 }
28422842
@@ -2927,17 +2927,17 @@ glm::vec2 Application::getScaledScreenPoint(glm::vec2 projectedPoint) { · 84 unmodified lines
29272927 void Application::renderRearViewMirror(const QRect& region, bool billboard) {
29282928 bool eyeRelativeCamera = false;
29292929 if (billboard) {
2930− _mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW);
2930+ _mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW); // degees
29312931 _mirrorCamera.setDistance(BILLBOARD_DISTANCE * _myAvatar->getScale());
29322932 _mirrorCamera.setTargetPosition(_myAvatar->getPosition());
29332933
29342934 } else if (_rearMirrorTools->getZoomLevel() == BODY) {
2935− _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW);
2935+ _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); // degrees
29362936 _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar->getScale());
29372937 _mirrorCamera.setTargetPosition(_myAvatar->getChestPosition());
29382938
29392939 } else { // HEAD zoom level
2940− _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW);
2940+ _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); // degrees
29412941 _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale());
29422942 if (_myAvatar->getSkeletonModel().isActive() && _myAvatar->getHead()->getFaceModel().isActive()) {
29432943 // as a hack until we have a better way of dealing with coordinate precision issues, reposition the
@@ -2951,7 +2951,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 7 unmodified lines
29512951 }
29522952 _mirrorCamera.setAspectRatio((float)region.width() / region.height());
29532953
2954− _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));
2954+ _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI, 0.0f)));
29552955 _mirrorCamera.update(1.0f/_fps);
29562956
29572957 // set the bounds of rear mirror view

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t