mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 01:24:03 +02:00
Merge pull request #4763 from ericrius1/quatHelpers
added axis and angle helper methods to Quat class- script user can now g...
This commit is contained in:
commit
457ae5b0dd
2 changed files with 10 additions and 0 deletions
|
@ -63,6 +63,14 @@ glm::quat Quat::angleAxis(float angle, const glm::vec3& v) {
|
|||
return glm::angleAxis(glm::radians(angle), v);
|
||||
}
|
||||
|
||||
glm::vec3 Quat::axis(const glm::quat& orientation) {
|
||||
return glm::axis(orientation);
|
||||
}
|
||||
|
||||
float Quat::angle(const glm::quat& orientation) {
|
||||
return glm::angle(orientation);
|
||||
}
|
||||
|
||||
glm::quat Quat::mix(const glm::quat& q1, const glm::quat& q2, float alpha) {
|
||||
return safeMix(q1, q2, alpha);
|
||||
}
|
||||
|
|
|
@ -35,6 +35,8 @@ public slots:
|
|||
glm::vec3 getUp(const glm::quat& orientation);
|
||||
glm::vec3 safeEulerAngles(const glm::quat& orientation); // degrees
|
||||
glm::quat angleAxis(float angle, const glm::vec3& v); // degrees
|
||||
glm::vec3 axis(const glm::quat& orientation);
|
||||
float angle(const glm::quat& orientation);
|
||||
glm::quat mix(const glm::quat& q1, const glm::quat& q2, float alpha);
|
||||
glm::quat slerp(const glm::quat& q1, const glm::quat& q2, float alpha);
|
||||
glm::quat squad(const glm::quat& q1, const glm::quat& q2, const glm::quat& s1, const glm::quat& s2, float h);
|
||||
|
|
Loading…
Reference in a new issue