42#ifndef UFO_CONTAINER_TREE_PREDICATE_DISJOINT_HPP
43#define UFO_CONTAINER_TREE_PREDICATE_DISJOINT_HPP
46#include <ufo/container/tree/predicate/filter.hpp>
47#include <ufo/container/tree/predicate/spatial.hpp>
48#include <ufo/geometry/disjoint.hpp>
49#include <ufo/geometry/inside.hpp>
56template <
class Geometry>
61template <
class Geometry>
66 static constexpr void init(
Pred&,
Tree const&)
noexcept
70 template <
class Value>
71 [[nodiscard]]
static constexpr bool returnableValue(
Pred const& p,
72 Value
const& v)
noexcept
74 if constexpr (is_pair_v<std::remove_cvref_t<Value>>) {
75 return disjoint(v.first, p.geometry);
82 [[nodiscard]]
static constexpr bool returnable(
Pred const& p,
Tree const& t,
89 [[nodiscard]]
static constexpr bool traversable(
Pred const& p,
Tree const& t,
96 [[nodiscard]]
static constexpr bool returnableRay(
Pred const& p,
Tree const& t,
100 return returnable(p, t, n);
103 template <
class Tree>
104 [[nodiscard]]
static constexpr bool traversableRay(
Pred const& p,
Tree const& t,
108 return traversable(p, t, n);
114template <
class Geometry>
Utilizing curiously recurring template pattern (CRTP)
Bounds bounds() const
Returns the bounds of the tree (/ root node).
constexpr bool inside(A const &a, B const &b)
Checks if a shape is inside another shape.
constexpr bool disjoint(A const &a, B const &b)
Checks if two shapes are disjoint.