mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
add more JS Quat features
This commit is contained in:
parent
7379f9c923
commit
e50f6389ca
2 changed files with 5 additions and 0 deletions
|
@ -18,3 +18,7 @@ glm::quat Quat::multiply(const glm::quat& q1, const glm::quat& q2) {
|
||||||
glm::quat Quat::fromVec3(const glm::vec3& vec3) {
|
glm::quat Quat::fromVec3(const glm::vec3& vec3) {
|
||||||
return glm::quat(vec3);
|
return glm::quat(vec3);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
glm::quat Quat::fromPitchYawRoll(float pitch, float yaw, float roll) {
|
||||||
|
return glm::quat(glm::radians(glm::vec3(pitch, yaw, roll)));
|
||||||
|
}
|
||||||
|
|
|
@ -22,6 +22,7 @@ class Quat : public QObject {
|
||||||
public slots:
|
public slots:
|
||||||
glm::quat multiply(const glm::quat& q1, const glm::quat& q2);
|
glm::quat multiply(const glm::quat& q1, const glm::quat& q2);
|
||||||
glm::quat fromVec3(const glm::vec3& vec3);
|
glm::quat fromVec3(const glm::vec3& vec3);
|
||||||
|
glm::quat fromPitchYawRoll(float pitch, float yaw, float roll);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue