17 static inline ShapeProjection shapeProjection{};
37 return this->boundingBox;
41 return shapeProjection(this->element);
51 {t.getBoundingBox()} -> std::convertible_to<Rectangle<fishnet::math::DEFAULT_NUMERIC>>;
53 typename T::element_type;
54 typename T::geometry_type;
62template<IBoundingBoxWrapper BBWrapper>
64 bool operator()(
const BBWrapper & lhs,
const BBWrapper & rhs)
const noexcept {
65 return lhs.getBoundingBox().top() > rhs.getBoundingBox().top();
74template<IBoundingBoxWrapper BBWrapper>
76 bool operator()(
const BBWrapper & lhs,
const BBWrapper & rhs)
const noexcept {
77 if(lhs.getBoundingBox().left() == rhs.getBoundingBox().left()){
78 return lhs.getBoundingBox().right() < rhs.getBoundingBox().right();
80 return lhs.getBoundingBox().left() < rhs.getBoundingBox().left();
Wrapper for Polygon objects, which stores a (custom) bounding box.
Definition BoundingBoxWrapper.hpp:13
BoundingBoxWrapper(const T &element)
Construct a new Bounding Box Polygon object, with default axis-aligned bounding box.
Definition BoundingBoxWrapper.hpp:26
const T & getElement() const noexcept
Definition BoundingBoxWrapper.hpp:44
T element_type
Definition BoundingBoxWrapper.hpp:19
BoundingBoxWrapper(const T &element, const Rectangle< fishnet::math::DEFAULT_NUMERIC > &boundingBox)
Construct a new Bounding Box Polygon object, with custom bounding box rectangle.
Definition BoundingBoxWrapper.hpp:34
const Rectangle< fishnet::math::DEFAULT_NUMERIC > & getBoundingBox() const noexcept
Definition BoundingBoxWrapper.hpp:36
std::invoke_result_t< ShapeProjection, T > geometry_type
Definition BoundingBoxWrapper.hpp:20
auto getPolygon() const noexcept
Definition BoundingBoxWrapper.hpp:40
Implementation of a rectangle Stores top,right,bottom and left point of the rectangle.
Definition Rectangle.hpp:15
Definition BoundingBoxWrapper.hpp:50
A geometry enclosing an area: a ring, a polygon or a multi-polygon.
Definition IGeometry.hpp:23
Definition BoundingBoxWrapper.hpp:5
Comparator for sorting BoundingBoxWrappers according to left-most position of the bounding box.
Definition BoundingBoxWrapper.hpp:75
bool operator()(const BBWrapper &lhs, const BBWrapper &rhs) const noexcept
Definition BoundingBoxWrapper.hpp:76
Comparator for sorting BoundingBoxWrappers according to top-most position of the bounding box.
Definition BoundingBoxWrapper.hpp:63
bool operator()(const BBWrapper &lhs, const BBWrapper &rhs) const noexcept
Definition BoundingBoxWrapper.hpp:64