summaryrefslogtreecommitdiff
path: root/lib/maths.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2021-12-28 15:42:50 +0000
committerDan Goodliffe <dan@randomdan.homeip.net>2021-12-28 15:42:50 +0000
commitde9909df038d1b6bb47bcc82fea5f8dc9dec2491 (patch)
treeb1f1337603c1bda68760d3f5f5147bc345e3e77f /lib/maths.cpp
parentComponent position mouse click check should only match mouse button events (diff)
downloadilt-de9909df038d1b6bb47bcc82fea5f8dc9dec2491.tar.bz2
ilt-de9909df038d1b6bb47bcc82fea5f8dc9dec2491.tar.xz
ilt-de9909df038d1b6bb47bcc82fea5f8dc9dec2491.zip
Initial implementation for being able to click in the main window to select something
Diffstat (limited to 'lib/maths.cpp')
-rw-r--r--lib/maths.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/maths.cpp b/lib/maths.cpp
index 4d9f8d4..b8dbd34 100644
--- a/lib/maths.cpp
+++ b/lib/maths.cpp
@@ -70,6 +70,12 @@ rotate_ypr(glm::vec3 a)
return rotate_yaw(a.y) * rotate_pitch(a.x) * rotate_roll(a.z);
}
+glm::mat4
+rotate_yp(glm::vec2 a)
+{
+ return rotate_yaw(a.y) * rotate_pitch(a.x);
+}
+
float
vector_yaw(const glm::vec3 & diff)
{