From b7613497eb6faf97794be39c5211b7dd63360983 Mon Sep 17 00:00:00 2001 From: Jeffrey Ventrella Date: Wed, 22 May 2013 18:14:18 -0700 Subject: [PATCH] fixed pitch yaw (not roll) --- interface/src/Head.cpp | 15 ++++++--------- libraries/avatars/src/Orientation.cpp | 7 ++++--- libraries/avatars/src/Orientation.h | 2 +- 3 files changed, 11 insertions(+), 13 deletions(-) diff --git a/interface/src/Head.cpp b/interface/src/Head.cpp index 86b4c7de3a..06f00ad78c 100644 --- a/interface/src/Head.cpp +++ b/interface/src/Head.cpp @@ -138,15 +138,12 @@ void Head::calculateGeometry(bool lookingInMirror) { yaw = _yaw; roll = _roll; } - - - _orientation.setToPitchYawRoll - ( - _bodyRotation.x + pitch, - _bodyRotation.y + yaw, - _bodyRotation.z + roll - ); - + + _orientation.setToIdentity(); + _orientation.pitch(_bodyRotation.x + pitch); + _orientation.yaw (_bodyRotation.y + yaw ); + //_orientation.roll (_bodyRotation.z + roll ); + //calculate the eye positions _leftEyePosition = _position - _orientation.getRight() * _scale * EYE_RIGHT_OFFSET diff --git a/libraries/avatars/src/Orientation.cpp b/libraries/avatars/src/Orientation.cpp index 1d26e99e49..ea4a29a1cd 100755 --- a/libraries/avatars/src/Orientation.cpp +++ b/libraries/avatars/src/Orientation.cpp @@ -22,14 +22,15 @@ void Orientation::setToIdentity() { front = glm::vec3(IDENTITY_FRONT); } +/* void Orientation::setToPitchYawRoll(float pitch_change, float yaw_change, float roll_change) { setToIdentity(); - pitch(pitch_change); - yaw (yaw_change); roll (roll_change); + yaw (yaw_change); + pitch(pitch_change); } - +*/ void Orientation::set(Orientation o) { diff --git a/libraries/avatars/src/Orientation.h b/libraries/avatars/src/Orientation.h index e546a95d60..30696d889a 100644 --- a/libraries/avatars/src/Orientation.h +++ b/libraries/avatars/src/Orientation.h @@ -22,7 +22,7 @@ public: Orientation(); void set(Orientation); - void setToPitchYawRoll(float pitch_change, float yaw_change, float roll_change); + //void setToPitchYawRoll(float pitch_change, float yaw_change, float roll_change); void setToIdentity(); void pitch(float pitch_change);