mirror of
https://github.com/overte-org/overte.git
synced 2025-08-10 11:13:09 +02:00
add getForward, getFront returns getForward
getForward better describes the returned vector as a direction
This commit is contained in:
parent
13222468e3
commit
6d664fd668
2 changed files with 7 additions and 1 deletions
|
@ -68,7 +68,12 @@ glm::quat Quat::inverse(const glm::quat& q) {
|
||||||
return glm::inverse(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) {
|
glm::vec3 Quat::getFront(const glm::quat& orientation) {
|
||||||
|
return getForward(orientation);
|
||||||
|
}
|
||||||
|
|
||||||
|
glm::vec3 Quat::getForward(const glm::quat& orientation) {
|
||||||
return orientation * Vectors::FRONT;
|
return orientation * Vectors::FRONT;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -45,7 +45,8 @@ 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 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 getRight(const glm::quat& orientation);
|
||||||
glm::vec3 getUp(const glm::quat& orientation);
|
glm::vec3 getUp(const glm::quat& orientation);
|
||||||
glm::vec3 safeEulerAngles(const glm::quat& orientation); // degrees
|
glm::vec3 safeEulerAngles(const glm::quat& orientation); // degrees
|
||||||
|
|
Loading…
Reference in a new issue