From 532dc285e71152775d4db551cbbae80443c7a17f Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 18 Apr 2013 01:16:54 -0700 Subject: [PATCH 1/5] Changed render_view_frustum() to handle broken camera yaw - I discovered that the Camera class has a Yaw that is actually 180deg off of true yaw. So when the avatar is facing at a yaw of 0deg, we were setting the camera to 180. This was causing the direction vectors to be rotated from where we expected them to be, and as a result the frustum was wrong - I did not fix the camera and the calls to glRotate() since I don't yet understan how these work. BUT. I did fix the frustum code to fix up this yaw before calculating the vectors --- interface/src/main.cpp | 39 ++++++++++++++++++----------- libraries/avatars/src/Orientation.h | 4 +++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 87ad2873d1..5bcae2cbeb 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -530,30 +530,39 @@ void render_view_frustum() { glm::vec3 up; glm::vec3 right; float fov, nearClip, farClip; + float yaw, pitch, roll; // Camera or Head? if (::cameraFrustum) { position = ::myCamera.getPosition(); - direction = ::myCamera.getOrientation().getFront() * glm::vec3(1,1,-1); - up = ::myCamera.getOrientation().getUp() * glm::vec3(1,1,1); - right = ::myCamera.getOrientation().getRight() * glm::vec3(1,1,-1); - fov = ::myCamera.getFieldOfView(); - nearClip = ::myCamera.getNearClip(); - farClip = ::myCamera.getFarClip(); } else { position = ::myAvatar.getHeadPosition(); - direction = ::myAvatar.getHeadLookatDirection(); - up = ::myAvatar.getHeadLookatDirectionUp(); - right = ::myAvatar.getHeadLookatDirectionRight() * glm::vec3(-1,1,-1); - - // NOTE: we use the same lens details if we draw from the head - fov = ::myCamera.getFieldOfView(); - nearClip = ::myCamera.getNearClip(); - farClip = ::myCamera.getFarClip(); } + + // This bit of hackery is all because our Camera's report the incorrect yaw. + // For whatever reason, the camera has a yaw set to 180.0-trueYaw, so we basically + // need to get the "yaw" from the body + yaw = -(::myCamera.getOrientation().getYaw()-180); + pitch = ::myCamera.getOrientation().getPitch(); + roll = ::myCamera.getOrientation().getRoll(); + fov = ::myCamera.getFieldOfView(); + nearClip = ::myCamera.getNearClip(); + farClip = ::myCamera.getFarClip(); + + // We can't use the camera's Orientation because of it's broken yaw. so we make a new + // correct orientation to get our vectors + Orientation o; + o.yaw(yaw); + o.pitch(pitch); + o.roll(roll); + + direction = o.getFront(); + up = o.getUp(); + right = o.getRight(); /* printf("position.x=%f, position.y=%f, position.z=%f\n", position.x, position.y, position.z); + printf("yaw=%f, pitch=%f, roll=%f\n", yaw,pitch,roll); printf("direction.x=%f, direction.y=%f, direction.z=%f\n", direction.x, direction.y, direction.z); printf("up.x=%f, up.y=%f, up.z=%f\n", up.x, up.y, up.z); printf("right.x=%f, right.y=%f, right.z=%f\n", right.x, right.y, right.z); @@ -561,7 +570,7 @@ void render_view_frustum() { printf("nearClip=%f\n", nearClip); printf("farClip=%f\n", farClip); */ - + // Set the viewFrustum up with the correct position and orientation of the camera viewFrustum.setPosition(position); viewFrustum.setOrientation(direction,up,right); diff --git a/libraries/avatars/src/Orientation.h b/libraries/avatars/src/Orientation.h index becddbd338..06425cf5dc 100755 --- a/libraries/avatars/src/Orientation.h +++ b/libraries/avatars/src/Orientation.h @@ -34,6 +34,10 @@ public: void pitch ( float ); void roll ( float ); + float getYaw() { return _yaw; }; + float getPitch(){ return _pitch; }; + float getRoll(){ return _roll; }; + void set( Orientation ); void setToIdentity(); From 894715598c270bbd855c68103b0b393452dfdf3a Mon Sep 17 00:00:00 2001 From: ZappoMan Date: Thu, 18 Apr 2013 08:49:07 -0700 Subject: [PATCH 2/5] fixed a comment --- interface/src/main.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/interface/src/main.cpp b/interface/src/main.cpp index 5bcae2cbeb..89fd5f9848 100644 --- a/interface/src/main.cpp +++ b/interface/src/main.cpp @@ -539,9 +539,9 @@ void render_view_frustum() { position = ::myAvatar.getHeadPosition(); } - // This bit of hackery is all because our Camera's report the incorrect yaw. + // This bit of hackery is all because our Cameras report the incorrect yaw. // For whatever reason, the camera has a yaw set to 180.0-trueYaw, so we basically - // need to get the "yaw" from the body + // need to get the "yaw" from the camera and adjust it to be the trueYaw yaw = -(::myCamera.getOrientation().getYaw()-180); pitch = ::myCamera.getOrientation().getPitch(); roll = ::myCamera.getOrientation().getRoll(); From b6b35f29e23a57b140ee0216e3780c3182486901 Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Apr 2013 10:46:10 -0700 Subject: [PATCH 3/5] switch the Agent printLog back from hexadecimal notation --- libraries/shared/src/Agent.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libraries/shared/src/Agent.cpp b/libraries/shared/src/Agent.cpp index 6973fef406..e50392c96f 100644 --- a/libraries/shared/src/Agent.cpp +++ b/libraries/shared/src/Agent.cpp @@ -216,9 +216,9 @@ void Agent::printLog(Agent const& agent) { sockaddr_in *agentPublicSocket = (sockaddr_in *) agent.publicSocket; sockaddr_in *agentLocalSocket = (sockaddr_in *) agent.localSocket; - ::printLog("T: %s (%c) PA: %8x:%d LA: %8x:%d\n", agent.getTypeName(), agent.type, - inet_ntoa(agentPublicSocket->sin_addr), ntohs(agentPublicSocket->sin_port), - inet_ntoa(agentLocalSocket->sin_addr), ntohs(agentLocalSocket->sin_port)); + ::printLog("T: %s (%c) PA: %s:%d LA: %s:%d\n", agent.getTypeName(), agent.type, + inet_ntoa(agentPublicSocket->sin_addr), ntohs(agentPublicSocket->sin_port), + inet_ntoa(agentLocalSocket->sin_addr), ntohs(agentLocalSocket->sin_port)); } std::ostream& operator<<(std::ostream& os, const Agent* agent) { From 651f7434a87406f1e5ead9454f83310c31a721bf Mon Sep 17 00:00:00 2001 From: Stephen Birarda Date: Thu, 18 Apr 2013 10:46:44 -0700 Subject: [PATCH 4/5] don't constantly print hand position to log --- libraries/avatars/src/AvatarData.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/libraries/avatars/src/AvatarData.cpp b/libraries/avatars/src/AvatarData.cpp index ef6012ec76..ad2311efe9 100644 --- a/libraries/avatars/src/AvatarData.cpp +++ b/libraries/avatars/src/AvatarData.cpp @@ -62,13 +62,9 @@ int AvatarData::getBroadcastData(unsigned char* destinationBuffer) { destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _bodyPitch); destinationBuffer += packFloatAngleToTwoByte(destinationBuffer, _bodyRoll); - //printLog( "_bodyYaw = %f", _bodyYaw ); - memcpy(destinationBuffer, &_handPosition, sizeof(float) * 3); destinationBuffer += sizeof(float) * 3; - printLog("%f, %f, %f\n", _handPosition.x, _handPosition.y, _handPosition.z); - return destinationBuffer - bufferStart; } From de6f33efa6e044cd6b598cf820e48307a000965c Mon Sep 17 00:00:00 2001 From: Jeffrey Ventrella Date: Thu, 18 Apr 2013 13:16:36 -0700 Subject: [PATCH 5/5] added "_" to all of Philip's old private members and tidied up the formatting in Head.h some --- interface/src/Head.cpp | 346 +++++++++++++------------- interface/src/Head.h | 109 ++++---- libraries/avatars/src/Orientation.cpp | 2 + 3 files changed, 227 insertions(+), 230 deletions(-) diff --git a/interface/src/Head.cpp b/interface/src/Head.cpp index f39c62e1aa..e68a957c2d 100644 --- a/interface/src/Head.cpp +++ b/interface/src/Head.cpp @@ -16,9 +16,6 @@ #include #include #include -//#include -//#include -//#include //looks like we might not need this using namespace std; @@ -68,40 +65,45 @@ Head::Head(bool isMine) { _TEST_bigSphereRadius = 0.3f; _TEST_bigSpherePosition = glm::vec3( 0.0f, _TEST_bigSphereRadius, 2.0f ); - for (int i = 0; i < MAX_DRIVE_KEYS; i++) driveKeys[i] = false; + for (int i = 0; i < MAX_DRIVE_KEYS; i++) _driveKeys[i] = false; - PupilSize = 0.10; - interPupilDistance = 0.6; - interBrowDistance = 0.75; - NominalPupilSize = 0.10; - _headYaw = 0.0; - EyebrowPitch[0] = EyebrowPitch[1] = -30; - EyebrowRoll[0] = 20; - EyebrowRoll[1] = -20; - MouthPitch = 0; - MouthYaw = 0; - MouthWidth = 1.0; - MouthHeight = 0.2; - EyeballPitch[0] = EyeballPitch[1] = 0; - EyeballScaleX = 1.2; EyeballScaleY = 1.5; EyeballScaleZ = 1.0; - EyeballYaw[0] = EyeballYaw[1] = 0; - PitchTarget = YawTarget = 0; - NoiseEnvelope = 1.0; - PupilConverge = 10.0; - leanForward = 0.0; - leanSideways = 0.0; - eyeContact = 1; - eyeContactTarget = LEFT_EYE; - scale = 1.0; - renderYaw = 0.0; - renderPitch = 0.0; - audioAttack = 0.0; - loudness = 0.0; - averageLoudness = 0.0; - lastLoudness = 0.0; - browAudioLift = 0.0; - noise = 0; - + _pupilSize = 0.10; + _interPupilDistance = 0.6; + _interBrowDistance = 0.75; + _nominalPupilSize = 0.10; + _headYaw = 0.0; + _eyebrowPitch[0] = -30; + _eyebrowPitch[1] = -30; + _eyebrowRoll [0] = 20; + _eyebrowRoll [1] = -20; + _mouthPitch = 0; + _mouthYaw = 0; + _mouthWidth = 1.0; + _mouthHeight = 0.2; + _eyeballPitch[0] = 0; + _eyeballPitch[1] = 0; + _eyeballScaleX = 1.2; + _eyeballScaleY = 1.5; + _eyeballScaleZ = 1.0; + _eyeballYaw[0] = 0; + _eyeballYaw[1] = 0; + _pitchTarget = 0; + _yawTarget = 0; + _noiseEnvelope = 1.0; + _pupilConverge = 10.0; + _leanForward = 0.0; + _leanSideways = 0.0; + _eyeContact = 1; + _eyeContactTarget = LEFT_EYE; + _scale = 1.0; + _renderYaw = 0.0; + _renderPitch = 0.0; + _audioAttack = 0.0; + _loudness = 0.0; + _averageLoudness = 0.0; + _lastLoudness = 0.0; + _browAudioLift = 0.0; + _noise = 0; _handBeingMoved = false; _previousHandBeingMoved = false; _movedHandOffset = glm::vec3( 0.0, 0.0, 0.0 ); @@ -109,7 +111,7 @@ Head::Head(bool isMine) { _springForce = 6.0f; _springVelocityDecay = 16.0f; - sphere = NULL; + _sphere = NULL; if (iris_texture.size() == 0) { switchToResourcesParentIfRequired(); @@ -120,18 +122,18 @@ Head::Head(bool isMine) { } for (int o=0; o BROW_LIFT_THRESHOLD) - browAudioLift += sqrt(audioAttack)/1000.0; + if (_audioAttack > BROW_LIFT_THRESHOLD) + _browAudioLift += sqrt(_audioAttack)/1000.0; - browAudioLift *= .90; + _browAudioLift *= .90; glPushMatrix(); - glTranslatef(-interBrowDistance/2.0,0.4,0.45); + glTranslatef(-_interBrowDistance/2.0,0.4,0.45); for(side = 0; side < 2; side++) { glColor3fv(browColor); glPushMatrix(); - glTranslatef(0, 0.35 + browAudioLift, 0); - glRotatef(EyebrowPitch[side]/2.0, 1, 0, 0); - glRotatef(EyebrowRoll[side]/2.0, 0, 0, 1); + glTranslatef(0, 0.35 + _browAudioLift, 0); + glRotatef(_eyebrowPitch[side]/2.0, 1, 0, 0); + glRotatef(_eyebrowRoll[side]/2.0, 0, 0, 1); glScalef(browWidth, browThickness, 1); glutSolidCube(0.5); glPopMatrix(); - glTranslatef(interBrowDistance, 0, 0); + glTranslatef(_interBrowDistance, 0, 0); } glPopMatrix(); @@ -785,73 +787,73 @@ void Head::renderHead(int faceToFace) { glPushMatrix(); glTranslatef(0,-0.35,0.75); glColor3f(0,0,0); - glRotatef(MouthPitch, 1, 0, 0); - glRotatef(MouthYaw, 0, 0, 1); - glScalef(MouthWidth*(.7 + sqrt(averageLoudness)/60.0), MouthHeight*(1.0 + sqrt(averageLoudness)/30.0), 1); + glRotatef(_mouthPitch, 1, 0, 0); + glRotatef(_mouthYaw, 0, 0, 1); + glScalef(_mouthWidth*(.7 + sqrt(_averageLoudness)/60.0), _mouthHeight*(1.0 + sqrt(_averageLoudness)/30.0), 1); glutSolidCube(0.5); glPopMatrix(); glTranslatef(0, 1.0, 0); - glTranslatef(-interPupilDistance/2.0,-0.68,0.7); + glTranslatef(-_interPupilDistance/2.0,-0.68,0.7); // Right Eye glRotatef(-10, 1, 0, 0); glColor3fv(eyeColor); glPushMatrix(); { - glTranslatef(interPupilDistance/10.0, 0, 0.05); + glTranslatef(_interPupilDistance/10.0, 0, 0.05); glRotatef(20, 0, 0, 1); - glScalef(EyeballScaleX, EyeballScaleY, EyeballScaleZ); + glScalef(_eyeballScaleX, _eyeballScaleY, _eyeballScaleZ); glutSolidSphere(0.25, 30, 30); } glPopMatrix(); // Right Pupil - if (sphere == NULL) { - sphere = gluNewQuadric(); - gluQuadricTexture(sphere, GL_TRUE); + if (_sphere == NULL) { + _sphere = gluNewQuadric(); + gluQuadricTexture(_sphere, GL_TRUE); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR); glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR); - gluQuadricOrientation(sphere, GLU_OUTSIDE); + gluQuadricOrientation(_sphere, GLU_OUTSIDE); glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA, iris_texture_width, iris_texture_height, 0, GL_RGBA, GL_UNSIGNED_BYTE, &iris_texture[0]); } glPushMatrix(); { - glRotatef(EyeballPitch[1], 1, 0, 0); - glRotatef(EyeballYaw[1] + PupilConverge, 0, 1, 0); + glRotatef(_eyeballPitch[1], 1, 0, 0); + glRotatef(_eyeballYaw[1] + _pupilConverge, 0, 1, 0); glTranslatef(0,0,.35); glRotatef(-75,1,0,0); glScalef(1.0, 0.4, 1.0); glEnable(GL_TEXTURE_2D); - gluSphere(sphere, PupilSize, 15, 15); + gluSphere(_sphere, _pupilSize, 15, 15); glDisable(GL_TEXTURE_2D); } glPopMatrix(); // Left Eye glColor3fv(eyeColor); - glTranslatef(interPupilDistance, 0, 0); + glTranslatef(_interPupilDistance, 0, 0); glPushMatrix(); { - glTranslatef(-interPupilDistance/10.0, 0, .05); + glTranslatef(-_interPupilDistance/10.0, 0, .05); glRotatef(-20, 0, 0, 1); - glScalef(EyeballScaleX, EyeballScaleY, EyeballScaleZ); + glScalef(_eyeballScaleX, _eyeballScaleY, _eyeballScaleZ); glutSolidSphere(0.25, 30, 30); } glPopMatrix(); // Left Pupil glPushMatrix(); { - glRotatef(EyeballPitch[0], 1, 0, 0); - glRotatef(EyeballYaw[0] - PupilConverge, 0, 1, 0); + glRotatef(_eyeballPitch[0], 1, 0, 0); + glRotatef(_eyeballYaw[0] - _pupilConverge, 0, 1, 0); glTranslatef(0, 0, .35); glRotatef(-75, 1, 0, 0); glScalef(1.0, 0.4, 1.0); glEnable(GL_TEXTURE_2D); - gluSphere(sphere, PupilSize, 15, 15); + gluSphere(_sphere, _pupilSize, 15, 15); glDisable(GL_TEXTURE_2D); } @@ -939,7 +941,6 @@ void Head::initializeSkeleton() { _bone[ AVATAR_BONE_RIGHT_SHIN ].parent = AVATAR_BONE_RIGHT_THIGH; _bone[ AVATAR_BONE_RIGHT_FOOT ].parent = AVATAR_BONE_RIGHT_SHIN; - //---------------------------------------------------------- // specify the default pose position //---------------------------------------------------------- @@ -1143,11 +1144,10 @@ void Head::updateHandMovement() { transformedHandMovement += handShakePull; */ - _bone[ AVATAR_BONE_RIGHT_HAND ].position = DEBUG_otherAvatarListPosition[ _closestOtherAvatar ]; + _bone[ AVATAR_BONE_RIGHT_HAND ].position = _DEBUG_otherAvatarListPosition[ _closestOtherAvatar ]; } } } - //------------------------------------------------------------------------------- // determine the arm vector @@ -1282,8 +1282,8 @@ void Head::renderBody() { } void Head::SetNewHeadTarget(float pitch, float yaw) { - PitchTarget = pitch; - YawTarget = yaw; + _pitchTarget = pitch; + _yawTarget = yaw; } // getting data from Android transmitte app @@ -1301,17 +1301,17 @@ void Head::processTransmitterData(unsigned char* packetData, int numBytes) { &linX, &linY, &linZ, &rot1, &rot2, &rot3, &rot4); - if (transmitterPackets++ == 0) { - gettimeofday(&transmitterTimer, NULL); + if (_transmitterPackets++ == 0) { + gettimeofday(&_transmitterTimer, NULL); } const int TRANSMITTER_COUNT = 100; - if (transmitterPackets % TRANSMITTER_COUNT == 0) { + if (_transmitterPackets % TRANSMITTER_COUNT == 0) { // Every 100 packets, record the observed Hz of the transmitter data timeval now; gettimeofday(&now, NULL); - double msecsElapsed = diffclock(&transmitterTimer, &now); - transmitterHz = static_cast( (double)TRANSMITTER_COUNT/(msecsElapsed/1000.0) ); - transmitterTimer = now; + double msecsElapsed = diffclock(&_transmitterTimer, &now); + _transmitterHz = static_cast( (double)TRANSMITTER_COUNT/(msecsElapsed/1000.0) ); + _transmitterTimer = now; } /* NOTE: PR: Will add back in when ready to animate avatar hand diff --git a/interface/src/Head.h b/interface/src/Head.h index cedc242ea5..c3150f53b9 100644 --- a/interface/src/Head.h +++ b/interface/src/Head.h @@ -108,15 +108,15 @@ class Head : public AvatarData { void reset(); void UpdateGyros(float frametime, SerialInterface * serialInterface, int head_mirror, glm::vec3 * gravity); - void setNoise (float mag) { noise = mag; } + void setNoise (float mag) { _noise = mag; } void setPitch(float p) {_headPitch = p; } void setYaw(float y) {_headYaw = y; } void setRoll(float r) {_headRoll = r; }; - void setScale(float s) {scale = s; }; - void setRenderYaw(float y) {renderYaw = y;} - void setRenderPitch(float p) {renderPitch = p;} - float getRenderYaw() {return renderYaw;} - float getRenderPitch() {return renderPitch;} + void setScale(float s) {_scale = s; }; + void setRenderYaw(float y) {_renderYaw = y;} + void setRenderPitch(float p) {_renderPitch = p;} + float getRenderYaw() {return _renderYaw;} + float getRenderPitch() {return _renderPitch;} void setLeanForward(float dist); void setLeanSideways(float dist); void addPitch(float p) {_headPitch -= p; } @@ -152,16 +152,16 @@ class Head : public AvatarData { void setHandMovement( glm::vec3 movement ); void updateHandMovement(); - float getLoudness() {return loudness;}; - float getAverageLoudness() {return averageLoudness;}; - void setAverageLoudness(float al) {averageLoudness = al;}; - void setLoudness(float l) {loudness = l;}; + float getLoudness() {return _loudness;}; + float getAverageLoudness() {return _averageLoudness;}; + void setAverageLoudness(float al) {_averageLoudness = al;}; + void setLoudness(float l) {_loudness = l;}; void SetNewHeadTarget(float, float); // Set what driving keys are being pressed to control thrust levels - void setDriveKeys(int key, bool val) { driveKeys[key] = val; }; - bool getDriveKeys(int key) { return driveKeys[key]; }; + void setDriveKeys(int key, bool val) { _driveKeys[key] = val; }; + bool getDriveKeys(int key) { return _driveKeys[key]; }; // Set/Get update the thrust that will move the avatar around void setThrust(glm::vec3 newThrust) { _avatar.thrust = newThrust; }; @@ -173,51 +173,48 @@ class Head : public AvatarData { // void processTransmitterData(unsigned char * packetData, int numBytes); - float getTransmitterHz() { return transmitterHz; }; + float getTransmitterHz() { return _transmitterHz; }; private: - bool _isMine; - float noise; + bool _isMine; + float _noise; float _headPitch; float _headYaw; float _headRoll; float _headPitchRate; float _headYawRate; float _headRollRate; - float EyeballPitch[2]; - float EyeballYaw[2]; - float EyebrowPitch[2]; - float EyebrowRoll[2]; - float EyeballScaleX, EyeballScaleY, EyeballScaleZ; - float interPupilDistance; - float interBrowDistance; - float NominalPupilSize; - float PupilSize; - float MouthPitch; - float MouthYaw; - float MouthWidth; - float MouthHeight; - float leanForward; - float leanSideways; - float PitchTarget; - float YawTarget; - float NoiseEnvelope; - float PupilConverge; - float scale; + float _eyeballPitch[2]; + float _eyeballYaw[2]; + float _eyebrowPitch[2]; + float _eyebrowRoll[2]; + float _eyeballScaleX, _eyeballScaleY, _eyeballScaleZ; + float _interPupilDistance; + float _interBrowDistance; + float _nominalPupilSize; + float _pupilSize; + float _mouthPitch; + float _mouthYaw; + float _mouthWidth; + float _mouthHeight; + float _leanForward; + float _leanSideways; + float _pitchTarget; + float _yawTarget; + float _noiseEnvelope; + float _pupilConverge; + float _scale; // Sound loudness information - float loudness, lastLoudness; - float averageLoudness; - float audioAttack; - float browAudioLift; + float _loudness, _lastLoudness; + float _averageLoudness; + float _audioAttack; + float _browAudioLift; - glm::vec3 _TEST_bigSpherePosition; - float _TEST_bigSphereRadius; - - //temporary - placeholder for real other avs - glm::vec3 DEBUG_otherAvatarListPosition [ NUM_OTHER_AVATARS ]; - float DEBUG_otherAvatarListTimer [ NUM_OTHER_AVATARS ]; - + glm::vec3 _TEST_bigSpherePosition; + float _TEST_bigSphereRadius; + glm::vec3 _DEBUG_otherAvatarListPosition[ NUM_OTHER_AVATARS ]; + float _DEBUG_otherAvatarListTimer [ NUM_OTHER_AVATARS ]; bool _triggeringAction; float _bodyYawDelta; float _closeEnoughToInteract; @@ -232,23 +229,21 @@ class Head : public AvatarData { AvatarBone _bone[ NUM_AVATAR_BONES ]; AvatarMode _mode; Avatar _avatar; + int _driveKeys[MAX_DRIVE_KEYS]; + int _eyeContact; + eyeContactTargets _eyeContactTarget; - int driveKeys[MAX_DRIVE_KEYS]; - - - int eyeContact; - eyeContactTargets eyeContactTarget; - - GLUquadric *sphere; + GLUquadric *_sphere; - float renderYaw, renderPitch; // Pitch from view frustum when this is own head. + float _renderYaw; + float _renderPitch; // Pitch from view frustum when this is own head. // // Related to getting transmitter UDP data used to animate the avatar hand // - timeval transmitterTimer; - float transmitterHz; - int transmitterPackets; + timeval _transmitterTimer; + float _transmitterHz; + int _transmitterPackets; //----------------------------- // private methods... diff --git a/libraries/avatars/src/Orientation.cpp b/libraries/avatars/src/Orientation.cpp index 08a4467f35..1cedb7305e 100755 --- a/libraries/avatars/src/Orientation.cpp +++ b/libraries/avatars/src/Orientation.cpp @@ -20,6 +20,8 @@ using avatars_lib::printLog; // // tosh - yep, I noticed... :-) // +// JJV - I noticed too :-) +// static bool testingForNormalizationAndOrthogonality = false; Orientation::Orientation() {