diff options
author | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-29 19:57:43 +0100 |
---|---|---|
committer | Dan Goodliffe <dan@randomdan.homeip.net> | 2022-08-29 19:57:43 +0100 |
commit | 54ee39ffd75421c4489d2b473de4a65ff541f21c (patch) | |
tree | d7db1f3acc5e8aa607fd5cef3ec249c71dc8a3cf /lib/ray.hpp | |
parent | Generic solution for streaming collections that can be spanned (diff) | |
download | ilt-54ee39ffd75421c4489d2b473de4a65ff541f21c.tar.bz2 ilt-54ee39ffd75421c4489d2b473de4a65ff541f21c.tar.xz ilt-54ee39ffd75421c4489d2b473de4a65ff541f21c.zip |
Ray function a calculate how close it passes to a line defined by 2 points
Diffstat (limited to 'lib/ray.hpp')
-rw-r--r-- | lib/ray.hpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ray.hpp b/lib/ray.hpp index 4c0710a..bce4a30 100644 --- a/lib/ray.hpp +++ b/lib/ray.hpp @@ -8,4 +8,6 @@ public: glm::vec3 start; glm::vec3 direction; + + float distanceToLine(const glm::vec3 & a, const glm::vec3 & b) const; }; |