add more JS Quat features

This commit is contained in:
ZappoMan 2014-02-07 00:00:30 -08:00
parent 7379f9c923
commit e50f6389ca
2 changed files with 5 additions and 0 deletions

View file

@ -18,3 +18,7 @@ glm::quat Quat::multiply(const glm::quat& q1, const glm::quat& q2) {
glm::quat Quat::fromVec3(const glm::vec3& 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)));
}

View file

@ -22,6 +22,7 @@ class Quat : public QObject {
public slots:
glm::quat multiply(const glm::quat& q1, const glm::quat& q2);
glm::quat fromVec3(const glm::vec3& vec3);
glm::quat fromPitchYawRoll(float pitch, float yaw, float roll);
};