Remove use of Quat::rotate

This commit is contained in:
Ryan Huffman 2014-09-12 13:31:07 -07:00
parent ffa47b1923
commit 113e9cf43b
3 changed files with 1 additions and 6 deletions

View file

@ -150,7 +150,7 @@ function update(dt) {
var maxSpeed = movementParameters.MAX_SPEED; var maxSpeed = movementParameters.MAX_SPEED;
velocity.x = Math.max(-maxSpeed, Math.min(maxSpeed, velocity.x)); velocity.x = Math.max(-maxSpeed, Math.min(maxSpeed, velocity.x));
velocity.z = Math.max(-maxSpeed, Math.min(maxSpeed, velocity.z)); velocity.z = Math.max(-maxSpeed, Math.min(maxSpeed, velocity.z));
var v = Quat.rotate(MyAvatar.headOrientation, velocity); var v = Vec3.multiplyQbyV(MyAvatar.headOrientation, velocity);
if (targetVelocityVertical == 0) { if (targetVelocityVertical == 0) {
targetVelocityVertical -= (velocityVertical * movementParameters.DRAG_COEFFICIENT * dt); targetVelocityVertical -= (velocityVertical * movementParameters.DRAG_COEFFICIENT * dt);

View file

@ -42,10 +42,6 @@ glm::quat Quat::inverse(const glm::quat& q) {
return glm::inverse(q); return glm::inverse(q);
} }
glm::vec3 Quat::rotate(const glm::quat& q, const glm::vec3& v) {
return glm::rotate(q, v);
}
glm::vec3 Quat::getFront(const glm::quat& orientation) { glm::vec3 Quat::getFront(const glm::quat& orientation) {
return orientation * IDENTITY_FRONT; return orientation * IDENTITY_FRONT;
} }

View file

@ -30,7 +30,6 @@ public slots:
glm::quat fromPitchYawRollDegrees(float pitch, float yaw, float roll); // degrees glm::quat fromPitchYawRollDegrees(float pitch, float yaw, float roll); // degrees
glm::quat fromPitchYawRollRadians(float pitch, float yaw, float roll); // radians glm::quat fromPitchYawRollRadians(float pitch, float yaw, float roll); // radians
glm::quat inverse(const glm::quat& q); glm::quat inverse(const glm::quat& q);
glm::vec3 rotate(const glm::quat& q, const glm::vec3& v);
glm::vec3 getFront(const glm::quat& orientation); glm::vec3 getFront(const glm::quat& orientation);
glm::vec3 getRight(const glm::quat& orientation); glm::vec3 getRight(const glm::quat& orientation);
glm::vec3 getUp(const glm::quat& orientation); glm::vec3 getUp(const glm::quat& orientation);