History

Merge pull request #2268 from AndrewMeadows/radians

prefer radians over degrees

Andrzej Kapolka committed 12 years ago

Commit e249b292 parents b1f4edb e68241d51 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
@@ -506,7 +506,7 @@ void Application::paintGL() { · 505 unmodified lines
506506 float headHeight = _myAvatar->getHead()->calculateAverageEyePosition().y - _myAvatar->getPosition().y;
507507 _myCamera.setDistance(MIRROR_FULLSCREEN_DISTANCE * _myAvatar->getScale());
508508 _myCamera.setTargetPosition(_myAvatar->getPosition() + glm::vec3(0, headHeight, 0));
509− _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));
509+ _myCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI, 0.0f)));
510510 }
511511
512512 // Update camera position
@@ -728,7 +728,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 215 unmodified lines
728728 if (!_myAvatar->getDriveKeys(UP)) {
729729 _myAvatar->jump();
730730 }
731− _myAvatar->setDriveKeys(UP, 1);
731+ _myAvatar->setDriveKeys(UP, 1.f);
732732 break;
733733
734734 case Qt::Key_Asterisk:
@@ -736,11 +736,11 @@ void Application::keyPressEvent(QKeyEvent* event) { · 1 unmodified line
736736 break;
737737
738738 case Qt::Key_C:
739− _myAvatar->setDriveKeys(DOWN, 1);
739+ _myAvatar->setDriveKeys(DOWN, 1.f);
740740 break;
741741
742742 case Qt::Key_W:
743− _myAvatar->setDriveKeys(FWD, 1);
743+ _myAvatar->setDriveKeys(FWD, 1.f);
744744 break;
745745
746746 case Qt::Key_S:
@@ -749,7 +749,7 @@ void Application::keyPressEvent(QKeyEvent* event) { · 2 unmodified lines
749749 } else if (!isShifted && isMeta) {
750750 takeSnapshot();
751751 } else {
752− _myAvatar->setDriveKeys(BACK, 1);
752+ _myAvatar->setDriveKeys(BACK, 1.f);
753753 }
754754 break;
755755
@@ -767,12 +767,12 @@ void Application::keyPressEvent(QKeyEvent* event) { · 11 unmodified lines
767767 if (isShifted) {
768768 Menu::getInstance()->triggerOption(MenuOption::Atmosphere);
769769 } else {
770− _myAvatar->setDriveKeys(ROT_LEFT, 1);
770+ _myAvatar->setDriveKeys(ROT_LEFT, 1.f);
771771 }
772772 break;
773773
774774 case Qt::Key_D:
775− _myAvatar->setDriveKeys(ROT_RIGHT, 1);
775+ _myAvatar->setDriveKeys(ROT_RIGHT, 1.f);
776776 break;
777777
778778 case Qt::Key_Return:
@@ -781,19 +781,19 @@ void Application::keyPressEvent(QKeyEvent* event) { · 2 unmodified lines
781781 break;
782782
783783 case Qt::Key_Up:
784− _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1);
784+ _myAvatar->setDriveKeys(isShifted ? UP : FWD, 1.f);
785785 break;
786786
787787 case Qt::Key_Down:
788− _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1);
788+ _myAvatar->setDriveKeys(isShifted ? DOWN : BACK, 1.f);
789789 break;
790790
791791 case Qt::Key_Left:
792− _myAvatar->setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1);
792+ _myAvatar->setDriveKeys(isShifted ? LEFT : ROT_LEFT, 1.f);
793793 break;
794794
795795 case Qt::Key_Right:
796− _myAvatar->setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1);
796+ _myAvatar->setDriveKeys(isShifted ? RIGHT : ROT_RIGHT, 1.f);
797797 break;
798798
799799 case Qt::Key_I:
@@ -922,47 +922,47 @@ void Application::keyReleaseEvent(QKeyEvent* event) { · 122 unmodified lines
922922 if (activeWindow() == _window) {
923923 switch (event->key()) {
924924 case Qt::Key_E:
925− _myAvatar->setDriveKeys(UP, 0);
925+ _myAvatar->setDriveKeys(UP, 0.f);
926926 break;
927927
928928 case Qt::Key_C:
929− _myAvatar->setDriveKeys(DOWN, 0);
929+ _myAvatar->setDriveKeys(DOWN, 0.f);
930930 break;
931931
932932 case Qt::Key_W:
933− _myAvatar->setDriveKeys(FWD, 0);
933+ _myAvatar->setDriveKeys(FWD, 0.f);
934934 break;
935935
936936 case Qt::Key_S:
937− _myAvatar->setDriveKeys(BACK, 0);
937+ _myAvatar->setDriveKeys(BACK, 0.f);
938938 break;
939939
940940 case Qt::Key_A:
941− _myAvatar->setDriveKeys(ROT_LEFT, 0);
941+ _myAvatar->setDriveKeys(ROT_LEFT, 0.f);
942942 break;
943943
944944 case Qt::Key_D:
945− _myAvatar->setDriveKeys(ROT_RIGHT, 0);
945+ _myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
946946 break;
947947
948948 case Qt::Key_Up:
949− _myAvatar->setDriveKeys(FWD, 0);
950− _myAvatar->setDriveKeys(UP, 0);
949+ _myAvatar->setDriveKeys(FWD, 0.f);
950+ _myAvatar->setDriveKeys(UP, 0.f);
951951 break;
952952
953953 case Qt::Key_Down:
954− _myAvatar->setDriveKeys(BACK, 0);
955− _myAvatar->setDriveKeys(DOWN, 0);
954+ _myAvatar->setDriveKeys(BACK, 0.f);
955+ _myAvatar->setDriveKeys(DOWN, 0.f);
956956 break;
957957
958958 case Qt::Key_Left:
959− _myAvatar->setDriveKeys(LEFT, 0);
960− _myAvatar->setDriveKeys(ROT_LEFT, 0);
959+ _myAvatar->setDriveKeys(LEFT, 0.f);
960+ _myAvatar->setDriveKeys(ROT_LEFT, 0.f);
961961 break;
962962
963963 case Qt::Key_Right:
964− _myAvatar->setDriveKeys(RIGHT, 0);
965− _myAvatar->setDriveKeys(ROT_RIGHT, 0);
964+ _myAvatar->setDriveKeys(RIGHT, 0.f);
965+ _myAvatar->setDriveKeys(ROT_RIGHT, 0.f);
966966 break;
967967
968968 default:
@@ -1464,7 +1464,7 @@ void Application::init() { · 495 unmodified lines
14641464 3.0f * TREE_SCALE / 2.0f));
14651465 _sharedVoxelSystemViewFrustum.setNearClip(TREE_SCALE / 2.0f);
14661466 _sharedVoxelSystemViewFrustum.setFarClip(3.0f * TREE_SCALE / 2.0f);
1467− _sharedVoxelSystemViewFrustum.setFieldOfView(90);
1467+ _sharedVoxelSystemViewFrustum.setFieldOfView(90.f);
14681468 _sharedVoxelSystemViewFrustum.setOrientation(glm::quat());
14691469 _sharedVoxelSystemViewFrustum.calculate();
14701470 _sharedVoxelSystem.setViewFrustum(&_sharedVoxelSystemViewFrustum);
@@ -2094,7 +2094,7 @@ void Application::queryOctree(NodeType_t serverType, PacketType packetType, Node · 623 unmodified lines
20942094 void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) {
20952095 // We will use these below, from either the camera or head vectors calculated above
20962096 glm::vec3 position(camera.getPosition());
2097− float fov = camera.getFieldOfView();
2097+ float fov = camera.getFieldOfView(); // degrees
20982098 float nearClip = camera.getNearClip();
20992099 float farClip = camera.getFarClip();
21002100 float aspectRatio = camera.getAspectRatio();
@@ -2107,7 +2107,7 @@ void Application::loadViewFrustum(Camera& camera, ViewFrustum& viewFrustum) { · 6 unmodified lines
21072107
21082108 // Also make sure it's got the correct lens details from the camera
21092109 viewFrustum.setAspectRatio(aspectRatio);
2110− viewFrustum.setFieldOfView(fov);
2110+ viewFrustum.setFieldOfView(fov); // degrees
21112111 viewFrustum.setNearClip(nearClip);
21122112 viewFrustum.setFarClip(farClip);
21132113 viewFrustum.setEyeOffsetPosition(camera.getEyeOffsetPosition());
@@ -2169,7 +2169,7 @@ void Application::updateShadowMap() { · 55 unmodified lines
21692169 glPushMatrix();
21702170 glLoadIdentity();
21712171 glm::vec3 axis = glm::axis(rotation);
2172− glRotatef(glm::angle(rotation), axis.x, axis.y, axis.z);
2172+ glRotatef(glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
21732173
21742174 // store view matrix without translation, which we'll use for precision-sensitive objects
21752175 glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix);
@@ -2248,7 +2248,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 72 unmodified lines
22482248 glm::vec3 eyeOffsetPos = whichCamera.getEyeOffsetPosition();
22492249 glm::quat eyeOffsetOrient = whichCamera.getEyeOffsetOrientation();
22502250 glm::vec3 eyeOffsetAxis = glm::axis(eyeOffsetOrient);
2251− glRotatef(-glm::angle(eyeOffsetOrient), eyeOffsetAxis.x, eyeOffsetAxis.y, eyeOffsetAxis.z);
2251+ glRotatef(-glm::degrees(glm::angle(eyeOffsetOrient)), eyeOffsetAxis.x, eyeOffsetAxis.y, eyeOffsetAxis.z);
22522252 glTranslatef(-eyeOffsetPos.x, -eyeOffsetPos.y, -eyeOffsetPos.z);
22532253
22542254 // transform view according to whichCamera
@@ -2257,7 +2257,7 @@ void Application::displaySide(Camera& whichCamera, bool selfAvatarOnly) { · 2 unmodified lines
22572257
22582258 glm::quat rotation = whichCamera.getRotation();
22592259 glm::vec3 axis = glm::axis(rotation);
2260− glRotatef(-glm::angle(rotation), axis.x, axis.y, axis.z);
2260+ glRotatef(-glm::degrees(glm::angle(rotation)), axis.x, axis.y, axis.z);
22612261
22622262 // store view matrix without translation, which we'll use for precision-sensitive objects
22632263 glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat*)&_untranslatedViewMatrix);
@@ -2470,7 +2470,7 @@ void Application::displayOverlay() { · 206 unmodified lines
24702470 (Menu::getInstance()->isOptionChecked(MenuOption::Stats) &&
24712471 Menu::getInstance()->isOptionChecked(MenuOption::Bandwidth))
24722472 ? 80 : 20;
2473− drawText(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 1.0f, 0, frameTimer, WHITE_TEXT);
2473+ drawText(_glWidget->width() - 100, _glWidget->height() - timerBottom, 0.30f, 1.0f, 0.f, frameTimer, WHITE_TEXT);
24742474 }
24752475
24762476 _overlays.render2D();
@@ -2525,11 +2525,11 @@ void Application::displayStats() { · 48 unmodified lines
25252525 sprintf(framesPerSecond, "Framerate: %3.0f FPS", _fps);
25262526
25272527 verticalOffset += STATS_PELS_PER_LINE;
2528− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, serverNodes, WHITE_TEXT);
2528+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, serverNodes, WHITE_TEXT);
25292529 verticalOffset += STATS_PELS_PER_LINE;
2530− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarNodes, WHITE_TEXT);
2530+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarNodes, WHITE_TEXT);
25312531 verticalOffset += STATS_PELS_PER_LINE;
2532− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, framesPerSecond, WHITE_TEXT);
2532+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, framesPerSecond, WHITE_TEXT);
25332533
25342534 if (_statsExpanded) {
25352535 char packetsPerSecond[30];
@@ -2538,9 +2538,9 @@ void Application::displayStats() { · 2 unmodified lines
25382538 sprintf(averageMegabitsPerSecond, "Mbps: %3.2f", (float)_bytesPerSecond * 8.f / 1000000.f);
25392539
25402540 verticalOffset += STATS_PELS_PER_LINE;
2541− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, packetsPerSecond, WHITE_TEXT);
2541+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, packetsPerSecond, WHITE_TEXT);
25422542 verticalOffset += STATS_PELS_PER_LINE;
2543− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, averageMegabitsPerSecond, WHITE_TEXT);
2543+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, averageMegabitsPerSecond, WHITE_TEXT);
25442544 }
25452545
25462546 verticalOffset = 0;
@@ -2583,7 +2583,7 @@ void Application::displayStats() { · 36 unmodified lines
25832583 "Buffer msecs %.1f",
25842584 (float) (_audio.getNetworkBufferLengthSamplesPerChannel() + (float) _audio.getJitterBufferSamples()) /
25852585 (float)_audio.getNetworkSampleRate() * 1000.f);
2586− drawText(30, _glWidget->height() - 22, 0.10f, 0, 2, audioJitter, WHITE_TEXT);
2586+ drawText(30, _glWidget->height() - 22, 0.10f, 0.f, 2.f, audioJitter, WHITE_TEXT);
25872587
25882588
25892589 char audioPing[30];
@@ -2596,18 +2596,18 @@ void Application::displayStats() { · 6 unmodified lines
25962596 sprintf(voxelAvgPing, "Voxel avg ping: %d", pingVoxel);
25972597
25982598 verticalOffset += STATS_PELS_PER_LINE;
2599− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, audioPing, WHITE_TEXT);
2599+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, audioPing, WHITE_TEXT);
26002600 verticalOffset += STATS_PELS_PER_LINE;
2601− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPing, WHITE_TEXT);
2601+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarPing, WHITE_TEXT);
26022602 verticalOffset += STATS_PELS_PER_LINE;
2603− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelAvgPing, WHITE_TEXT);
2603+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, voxelAvgPing, WHITE_TEXT);
26042604
26052605 if (_statsExpanded) {
26062606 char voxelMaxPing[30];
26072607 sprintf(voxelMaxPing, "Voxel max ping: %d", pingVoxelMax);
26082608
26092609 verticalOffset += STATS_PELS_PER_LINE;
2610− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, voxelMaxPing, WHITE_TEXT);
2610+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, voxelMaxPing, WHITE_TEXT);
26112611 }
26122612
26132613 verticalOffset = 0;
@@ -2635,11 +2635,11 @@ void Application::displayStats() { · 21 unmodified lines
26352635 char avatarMixerStats[200];
26362636
26372637 verticalOffset += STATS_PELS_PER_LINE;
2638− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarPosition, WHITE_TEXT);
2638+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarPosition, WHITE_TEXT);
26392639 verticalOffset += STATS_PELS_PER_LINE;
2640− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarVelocity, WHITE_TEXT);
2640+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarVelocity, WHITE_TEXT);
26412641 verticalOffset += STATS_PELS_PER_LINE;
2642− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarBodyYaw, WHITE_TEXT);
2642+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarBodyYaw, WHITE_TEXT);
26432643
26442644 if (_statsExpanded) {
26452645 SharedNodePointer avatarMixer = NodeList::getInstance()->soloNodeOfType(NodeType::AvatarMixer);
@@ -2652,7 +2652,7 @@ void Application::displayStats() { · 6 unmodified lines
26522652 }
26532653
26542654 verticalOffset += STATS_PELS_PER_LINE;
2655− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, avatarMixerStats, WHITE_TEXT);
2655+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, avatarMixerStats, WHITE_TEXT);
26562656 }
26572657
26582658 verticalOffset = 0;
@@ -2667,7 +2667,7 @@ void Application::displayStats() { · 8 unmodified lines
26672667 voxelStats.str("");
26682668 voxelStats << "Voxels Memory Nodes: " << VoxelTreeElement::getTotalMemoryUsage() / 1000000.f << "MB";
26692669 verticalOffset += STATS_PELS_PER_LINE;
2670− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2670+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
26712671
26722672 voxelStats.str("");
26732673 voxelStats <<
@@ -2677,14 +2677,14 @@ void Application::displayStats() { · 3 unmodified lines
26772677 voxelStats << " / GPU: " << _voxels.getVoxelMemoryUsageGPU() / 1000000.f << "MB";
26782678 }
26792679 verticalOffset += STATS_PELS_PER_LINE;
2680− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2680+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
26812681
26822682 // Voxel Rendering
26832683 voxelStats.str("");
26842684 voxelStats.precision(4);
26852685 voxelStats << "Voxel Rendering Slots Max: " << _voxels.getMaxVoxels() / 1000.f << "K";
26862686 verticalOffset += STATS_PELS_PER_LINE;
2687− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2687+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
26882688 }
26892689
26902690 voxelStats.str("");
@@ -2692,7 +2692,7 @@ void Application::displayStats() { · 1 unmodified line
26922692 voxelStats << "Drawn: " << _voxels.getVoxelsWritten() / 1000.f << "K " <<
26932693 "Abandoned: " << _voxels.getAbandonedVoxels() / 1000.f << "K ";
26942694 verticalOffset += STATS_PELS_PER_LINE;
2695− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2695+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
26962696
26972697 // iterate all the current voxel stats, and list their sending modes, and total voxel counts
26982698 std::stringstream sendingMode("");
@@ -2736,7 +2736,7 @@ void Application::displayStats() { · 37 unmodified lines
27362736 sendingMode << " <SCENE STABLE>";
27372737 }
27382738 verticalOffset += STATS_PELS_PER_LINE;
2739− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)sendingMode.str().c_str(), WHITE_TEXT);
2739+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)sendingMode.str().c_str(), WHITE_TEXT);
27402740 }
27412741
27422742 // Incoming packets
@@ -2748,7 +2748,7 @@ void Application::displayStats() { · 5 unmodified lines
27482748 voxelStats << "Voxel Packets to Process: " << packetsString.toLocal8Bit().constData()
27492749 << " [Recent Max: " << maxString.toLocal8Bit().constData() << "]";
27502750 verticalOffset += STATS_PELS_PER_LINE;
2751− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2751+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27522752 }
27532753
27542754 if (_resetRecentMaxPacketsSoon && voxelPacketsToProcess > 0) {
@@ -2771,7 +2771,7 @@ void Application::displayStats() { · 16 unmodified lines
27712771 voxelStats.str("");
27722772 voxelStats << "Server voxels: " << serversTotalString.toLocal8Bit().constData();
27732773 verticalOffset += STATS_PELS_PER_LINE;
2774− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2774+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27752775
27762776 if (_statsExpanded) {
27772777 QString serversInternalString = locale.toString((uint)totalInternal);
@@ -2782,7 +2782,7 @@ void Application::displayStats() { · 4 unmodified lines
27822782 "Internal: " << serversInternalString.toLocal8Bit().constData() << " " <<
27832783 "Leaves: " << serversLeavesString.toLocal8Bit().constData() << "";
27842784 verticalOffset += STATS_PELS_PER_LINE;
2785− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2785+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27862786 }
27872787
27882788 unsigned long localTotal = VoxelTreeElement::getNodeCount();
@@ -2792,7 +2792,7 @@ void Application::displayStats() { · 3 unmodified lines
27922792 voxelStats.str("");
27932793 voxelStats << "Local voxels: " << localTotalString.toLocal8Bit().constData();
27942794 verticalOffset += STATS_PELS_PER_LINE;
2795− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2795+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
27962796
27972797 if (_statsExpanded) {
27982798 unsigned long localInternal = VoxelTreeElement::getInternalNodeCount();
@@ -2805,7 +2805,7 @@ void Application::displayStats() { · 6 unmodified lines
28052805 "Internal: " << localInternalString.toLocal8Bit().constData() << " " <<
28062806 "Leaves: " << localLeavesString.toLocal8Bit().constData() << "";
28072807 verticalOffset += STATS_PELS_PER_LINE;
2808− drawText(horizontalOffset, verticalOffset, 0.10f, 0, 2, (char*)voxelStats.str().c_str(), WHITE_TEXT);
2808+ drawText(horizontalOffset, verticalOffset, 0.10f, 0.f, 2.f, (char*)voxelStats.str().c_str(), WHITE_TEXT);
28092809 }
28102810 }
28112811
@@ -2896,17 +2896,17 @@ glm::vec2 Application::getScaledScreenPoint(glm::vec2 projectedPoint) { · 84 unmodified lines
28962896 void Application::renderRearViewMirror(const QRect& region, bool billboard) {
28972897 bool eyeRelativeCamera = false;
28982898 if (billboard) {
2899− _mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW);
2899+ _mirrorCamera.setFieldOfView(BILLBOARD_FIELD_OF_VIEW); // degees
29002900 _mirrorCamera.setDistance(BILLBOARD_DISTANCE * _myAvatar->getScale());
29012901 _mirrorCamera.setTargetPosition(_myAvatar->getPosition());
29022902
29032903 } else if (_rearMirrorTools->getZoomLevel() == BODY) {
2904− _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW);
2904+ _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); // degrees
29052905 _mirrorCamera.setDistance(MIRROR_REARVIEW_BODY_DISTANCE * _myAvatar->getScale());
29062906 _mirrorCamera.setTargetPosition(_myAvatar->getChestPosition());
29072907
29082908 } else { // HEAD zoom level
2909− _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW);
2909+ _mirrorCamera.setFieldOfView(MIRROR_FIELD_OF_VIEW); // degrees
29102910 _mirrorCamera.setDistance(MIRROR_REARVIEW_DISTANCE * _myAvatar->getScale());
29112911 if (_myAvatar->getSkeletonModel().isActive() && _myAvatar->getHead()->getFaceModel().isActive()) {
29122912 // as a hack until we have a better way of dealing with coordinate precision issues, reposition the
@@ -2920,7 +2920,7 @@ void Application::renderRearViewMirror(const QRect& region, bool billboard) { · 7 unmodified lines
29202920 }
29212921 _mirrorCamera.setAspectRatio((float)region.width() / region.height());
29222922
2923− _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PIf, 0.0f)));
2923+ _mirrorCamera.setTargetRotation(_myAvatar->getWorldAlignedOrientation() * glm::quat(glm::vec3(0.0f, PI, 0.0f)));
29242924 _mirrorCamera.update(1.0f/_fps);
29252925
29262926 // 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