add getForward, getFront returns getForward

getForward better describes the returned vector as a direction
This commit is contained in:
Triplelexx 2017-03-21 19:54:32 +00:00
parent 13222468e3
commit 6d664fd668
2 changed files with 7 additions and 1 deletions

View file

@ -68,7 +68,12 @@ glm::quat Quat::inverse(const glm::quat& q) {
return glm::inverse(q);
}
// redundant, calls getForward which better describes the returned vector as a direction
glm::vec3 Quat::getFront(const glm::quat& orientation) {
return getForward(orientation);
}
glm::vec3 Quat::getForward(const glm::quat& orientation) {
return orientation * Vectors::FRONT;
}

View file

@ -45,7 +45,8 @@ public slots:
glm::quat fromPitchYawRollDegrees(float pitch, float yaw, float roll); // degrees
glm::quat fromPitchYawRollRadians(float pitch, float yaw, float roll); // radians
glm::quat inverse(const glm::quat& q);
glm::vec3 getFront(const glm::quat& orientation);
glm::vec3 getFront(const glm::quat& orientation); // redundant, calls getForward which better describes the returned vector as a direction
glm::vec3 getForward(const glm::quat& orientation);
glm::vec3 getRight(const glm::quat& orientation);
glm::vec3 getUp(const glm::quat& orientation);
glm::vec3 safeEulerAngles(const glm::quat& orientation); // degrees