From ad8246a0f5e29e807a82d51276cc6b23339e9408 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 22 May 2013 13:46:39 -0700 Subject: [PATCH 1/3] Turned log off by default --- interface/src/Application.cpp | 2 +- interface/src/LogDisplay.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Application.cpp b/interface/src/Application.cpp index d56163e170..de428c183e 100644 --- a/interface/src/Application.cpp +++ b/interface/src/Application.cpp @@ -1233,7 +1233,7 @@ void Application::initMenu() { (_renderStatsOn = toolsMenu->addAction("Stats"))->setCheckable(true); _renderStatsOn->setShortcut(Qt::Key_Slash); (_logOn = toolsMenu->addAction("Log"))->setCheckable(true); - _logOn->setChecked(true); + _logOn->setChecked(false); QMenu* voxelMenu = menuBar->addMenu("Voxels"); _voxelModeActions = new QActionGroup(this); diff --git a/interface/src/LogDisplay.cpp b/interface/src/LogDisplay.cpp index 61ab9aa415..6a65c30021 100644 --- a/interface/src/LogDisplay.cpp +++ b/interface/src/LogDisplay.cpp @@ -28,7 +28,8 @@ LogDisplay LogDisplay::instance; LogDisplay::LogDisplay() : - _textRenderer(MONO_FONT_FAMILY, -1, -1, false, TextRenderer::SHADOW_EFFECT), + + _textRenderer(SANS_FONT_FAMILY, -1, -1, false, TextRenderer::SHADOW_EFFECT), _stream(DEFAULT_STREAM), _chars(0l), _lines(0l), From 803c41d636b17814fb2ff183cea0327b2d522d69 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 22 May 2013 15:28:24 -0700 Subject: [PATCH 2/3] Chat text floats above head, not torso. --- interface/src/Avatar.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index c4d2ca8ec7..94a42c1ba9 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -58,7 +58,7 @@ float lightBlue [] = {0.7, 0.8, 1.0 }; bool usingBigSphereCollisionTest = true; float chatMessageScale = 0.0015; -float chatMessageHeight = 0.45; +float chatMessageHeight = 0.10; Avatar::Avatar(bool isMine) : _isMine(isMine), @@ -772,7 +772,8 @@ void Avatar::render(bool lookingInMirror, glm::vec3 cameraPosition) { float modelview[16]; glGetFloatv(GL_MODELVIEW_MATRIX, modelview); - glTranslatef(_position.x, _position.y + chatMessageHeight, _position.z); + //glTranslatef(_position.x, _position.y + chatMessageHeight, _position.z); + glTranslatef(_joint[AVATAR_JOINT_HEAD_BASE].springyPosition.x, _joint[AVATAR_JOINT_HEAD_BASE].springyPosition.y + chatMessageHeight, _joint[AVATAR_JOINT_HEAD_BASE].springyPosition.z); glRotatef(atan2(-modelview[2], -modelview[10]) * 180 / PI, 0, 1, 0); glColor3f(0, 0.8, 0); From 5bee5f07e3befa8c69a5b9cd44920a8bf7c0a66f Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Wed, 22 May 2013 15:45:15 -0700 Subject: [PATCH 3/3] Don't render body if looking in mirror, don't render test sphere over and over again for everyone. --- interface/src/Avatar.cpp | 93 +++++++++++++++++++--------------------- 1 file changed, 43 insertions(+), 50 deletions(-) diff --git a/interface/src/Avatar.cpp b/interface/src/Avatar.cpp index 94a42c1ba9..3f391612c2 100644 --- a/interface/src/Avatar.cpp +++ b/interface/src/Avatar.cpp @@ -729,7 +729,7 @@ void Avatar::render(bool lookingInMirror, glm::vec3 cameraPosition) { _cameraPosition = cameraPosition; // store this for use in various parts of the code - if (usingBigSphereCollisionTest) { + if (_isMine && usingBigSphereCollisionTest) { // show TEST big sphere glColor4f(0.5f, 0.6f, 0.8f, 0.7); glPushMatrix(); @@ -1127,58 +1127,51 @@ void Avatar::updateArmIKAndConstraints(float deltaTime) { void Avatar::renderBody(bool lookingInMirror) { - // Render joint positions as spheres - for (int b = 0; b < NUM_AVATAR_JOINTS; b++) { - - if (b == AVATAR_JOINT_HEAD_BASE) { // the head is rendered as a special case - if (_displayingHead) { - _head.render(lookingInMirror); - } - } else { - - glColor3f( - skinColor[0] + _joint[b].touchForce * 0.3f, - skinColor[1] - _joint[b].touchForce * 0.2f, - skinColor[2] - _joint[b].touchForce * 0.1f - ); - - glPushMatrix(); - glTranslatef(_joint[b].springyPosition.x, _joint[b].springyPosition.y, _joint[b].springyPosition.z); - glutSolidSphere(_joint[b].radius, 20.0f, 20.0f); - glPopMatrix(); - } + // Render Head + if (_displayingHead) { + _head.render(lookingInMirror); } - for (int j = 1; j < NUM_AVATAR_JOINTS; j++) { - if (_joint[j].parent != AVATAR_JOINT_NULL) - if ((j != AVATAR_JOINT_HEAD_TOP ) - && (j != AVATAR_JOINT_HEAD_BASE ) - && (j != AVATAR_JOINT_PELVIS ) - && (j != AVATAR_JOINT_TORSO ) - && (j != AVATAR_JOINT_CHEST ) - && (j != AVATAR_JOINT_LEFT_COLLAR ) - && (j != AVATAR_JOINT_LEFT_SHOULDER ) - && (j != AVATAR_JOINT_RIGHT_COLLAR ) - && (j != AVATAR_JOINT_RIGHT_SHOULDER)) { - // Render cone sections connecting the joint positions - glColor3fv(darkSkinColor); - renderJointConnectingCone - ( - _joint[_joint[j].parent ].springyPosition, - _joint[j ].springyPosition, - _joint[_joint[j].parent ].radius * 0.8, - _joint[j ].radius * 0.8 - ); + // Render reset of body if not in mirror mode + if (!lookingInMirror) { + // Render joint positions as spheres + for (int b = 0; b < NUM_AVATAR_JOINTS; b++) { + + if (b != AVATAR_JOINT_HEAD_BASE) { + glColor3f( + skinColor[0] + _joint[b].touchForce * 0.3f, + skinColor[1] - _joint[b].touchForce * 0.2f, + skinColor[2] - _joint[b].touchForce * 0.1f + ); + + glPushMatrix(); + glTranslatef(_joint[b].springyPosition.x, _joint[b].springyPosition.y, _joint[b].springyPosition.z); + glutSolidSphere(_joint[b].radius, 20.0f, 20.0f); + glPopMatrix(); + } + } - /* - // Render lines connecting the joint positions - glColor3f(0.4f, 0.5f, 0.6f); - glLineWidth(3.0); - glBegin(GL_LINE_STRIP); - glVertex3fv(&_joint[ _joint[ b ].parent ].springyPosition.x); - glVertex3fv(&_joint[ b ].springyPosition.x); - glEnd(); - */ + for (int j = 1; j < NUM_AVATAR_JOINTS; j++) { + if (_joint[j].parent != AVATAR_JOINT_NULL) + if ((j != AVATAR_JOINT_HEAD_TOP ) + && (j != AVATAR_JOINT_HEAD_BASE ) + && (j != AVATAR_JOINT_PELVIS ) + && (j != AVATAR_JOINT_TORSO ) + && (j != AVATAR_JOINT_CHEST ) + && (j != AVATAR_JOINT_LEFT_COLLAR ) + && (j != AVATAR_JOINT_LEFT_SHOULDER ) + && (j != AVATAR_JOINT_RIGHT_COLLAR ) + && (j != AVATAR_JOINT_RIGHT_SHOULDER)) { + // Render cone sections connecting the joint positions + glColor3fv(darkSkinColor); + renderJointConnectingCone + ( + _joint[_joint[j].parent ].springyPosition, + _joint[j ].springyPosition, + _joint[_joint[j].parent ].radius * 0.8, + _joint[j ].radius * 0.8 + ); + } } } }