From d9099b5f5a2d660539671bd21b4f14486e4ed9a9 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 18 Apr 2013 13:34:37 -0700 Subject: [PATCH 1/2] removed 2 unneeded debug lines --- interface/src/SerialInterface.cpp | 3 +-- libraries/avatars/src/AvatarData.cpp | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/interface/src/SerialInterface.cpp b/interface/src/SerialInterface.cpp index abc1e27bbf..9fe57ecaaf 100644 --- a/interface/src/SerialInterface.cpp +++ b/interface/src/SerialInterface.cpp @@ -169,7 +169,6 @@ void SerialInterface::readData() { int initialSamples = totalSamples; while (read(serialFd, &bufchar, 1) > 0) { - //printLof("%c", bufchar[0]); serialBuffer[serialBufferPos] = bufchar[0]; serialBufferPos++; // Have we reached end of a line of input? @@ -209,7 +208,7 @@ void SerialInterface::readData() { } if (totalSamples == GRAVITY_SAMPLES) { gravity = glm::normalize(gravity); - //printLof("gravity: %f,%f,%f\n", gravity.x, gravity.y, gravity.z); + printLog("gravity: %f,%f,%f\n", gravity.x, gravity.y, gravity.z); } totalSamples++; diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index ef6012ec76..22b395c475 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -67,7 +67,7 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { memcpy(destinationBuffer, &_handPosition, sizeof(float) * 3); destinationBuffer += sizeof(float) * 3; - printLog("%f, %f, %f\n", _handPosition.x, _handPosition.y, _handPosition.z); + //printLog("%f, %f, %f\n", _handPosition.x, _handPosition.y, _handPosition.z); return destinationBuffer - bufferStart; } From 5443d80c6f4f5b4cb4b393866811c76d4e234463 Mon Sep 17 00:00:00 2001 From: Philip Rosedale Date: Thu, 18 Apr 2013 14:00:48 -0700 Subject: [PATCH 2/2] Removed negation of front vector which was reversing yaw in avatar skeleton. --- interface/src/Head.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/interface/src/Head.cpp b/interface/src/Head.cpp index e68a957c2d..a18965a372 100644 --- a/interface/src/Head.cpp +++ b/interface/src/Head.cpp @@ -1026,7 +1026,7 @@ void Head::updateSkeleton() { float xx = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getRight () ); float yy = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getUp () ); - float zz = -glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getFront () ); + float zz = glm::dot( _bone[b].defaultPosePosition, _bone[b].orientation.getFront () ); glm::vec3 rotatedBoneVector( xx, yy, zz );