fixed pitch yaw (not roll)

This commit is contained in:
Jeffrey Ventrella 2013-05-22 18:14:18 -07:00
parent 2f943b697a
commit b7613497eb
3 changed files with 11 additions and 13 deletions

View file

@ -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

View file

@ -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) {

View file

@ -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);