diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-21 20:56:09 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2023-10-21 20:56:09 +0200 |
commit | aaf5245aba8daba3ec0b47974b8b7c7880a6738b (patch) | |
tree | 8296094dd0a42228d2d8e2bac348092c5d21bfef /src/RTree-search.hpp | |
parent | 0e4539dfcb89e19f9d3917a86879c9eb658db7e4 (diff) |
a
Diffstat (limited to 'src/RTree-search.hpp')
-rw-r--r-- | src/RTree-search.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/RTree-search.hpp b/src/RTree-search.hpp index 4b824cd6..47c53592 100644 --- a/src/RTree-search.hpp +++ b/src/RTree-search.hpp @@ -1,6 +1,18 @@ #pragma once #include "compat/assert.hpp" #include "RTree.h" +#include <Magnum/Magnum.h> +#include <Magnum/Math/Vector2.h> + +namespace floormat { + +constexpr inline bool rect_intersects(Vector2 min1, Vector2 max1, Vector2 min2, Vector2 max2) +{ + return min1.x() < max2.x() && max1.x() > min2.x() && + min1.y() < max2.y() && max1.y() > min2.y(); +} + +} // namespace floormat RTREE_TEMPLATE template<typename F> |