diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-28 15:42:50 +0000 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2021-12-28 15:42:50 +0000 |
commit | de9909df038d1b6bb47bcc82fea5f8dc9dec2491 (patch) | |
tree | b1f1337603c1bda68760d3f5f5147bc345e3e77f /lib/maths.h | |
parent | Component position mouse click check should only match mouse button events (diff) | |
download | ilt-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.h')
-rw-r--r-- | lib/maths.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/maths.h b/lib/maths.h index ad2f3e5..a75c7a8 100644 --- a/lib/maths.h +++ b/lib/maths.h @@ -51,6 +51,7 @@ glm::mat2 rotate_flat(float); glm::mat4 rotate_roll(float); glm::mat4 rotate_yaw(float); glm::mat4 rotate_pitch(float); +glm::mat4 rotate_yp(glm::vec2); glm::mat4 rotate_ypr(glm::vec3); float vector_yaw(const glm::vec3 & diff); @@ -84,6 +85,12 @@ operator^(const glm::vec2 & v, float z) return {v.x, v.y, z}; } +constexpr inline glm::vec4 +operator^(const glm::vec3 & v, float w) +{ + return {v.x, v.y, v.z, w}; +} + constexpr inline glm::vec3 operator!(const glm::vec2 & v) { |