12template<fishnet::math::Number T>
36 return static_cast<const Ring<T> &
>(*this);
40 return std::ranges::empty_view<Ring<T>>();
47 template<fishnet::math::Number U>
65 return this->
getBoundary().contains(other.getBoundary());
69 return this->
getBoundary().crosses(other.getBoundary());
73 return this->
getBoundary().touches(other.getBoundary());
83 if(this->
touches(other))
return 0;
84 return this->
getBoundary().distance(other.getBoundary());
90template<math::Number T>
96template<std::ranges::random_access_range R>
Implementation of a rectangle Stores top,right,bottom and left point of the rectangle.
Definition Rectangle.hpp:15
Implementation of a ring.
Definition Ring.hpp:31
Implementation of a segment.
Definition Segment.hpp:14
Simple polygon implementation with no holes.
Definition SimplePolygon.hpp:13
constexpr bool crosses(IPolygon auto const &other) const noexcept
Definition SimplePolygon.hpp:68
constexpr fishnet::math::DEFAULT_FLOATING_POINT distance(IPolygon auto const &other) const noexcept
Distance between the two polygons.
Definition SimplePolygon.hpp:81
constexpr bool containsInHole(IPolygon auto const &other) const noexcept
Definition SimplePolygon.hpp:60
T numeric_type
Definition SimplePolygon.hpp:15
constexpr util::view_of< Ring< T > > auto getHoles() const noexcept
Definition SimplePolygon.hpp:39
constexpr bool containsInHole(IPoint auto const &point) const noexcept
Definition SimplePolygon.hpp:56
constexpr bool contains(IPolygon auto const &other) const noexcept
Definition SimplePolygon.hpp:64
constexpr util::random_access_range_of< Vec2D< T > > auto getPoints()=delete
SimplePolygon(util::random_access_range_of< Segment< T > > auto const &segments)
Definition SimplePolygon.hpp:29
constexpr bool touches(IPolygon auto const &other) const noexcept
Definition SimplePolygon.hpp:72
SimplePolygon(const Ring< T > &boundary)
Definition SimplePolygon.hpp:23
static constexpr GeometryType type
Definition SimplePolygon.hpp:16
constexpr Rectangle< T > aaBB() const noexcept
Definition SimplePolygon.hpp:43
constexpr const Ring< T > & getBoundary() const noexcept
Definition SimplePolygon.hpp:35
constexpr util::view_of< Segment< T > > auto getSegments()=delete
constexpr bool isSimple() const noexcept
Definition SimplePolygon.hpp:52
SimplePolygon(util::random_access_range_of< Vec2D< T > > auto const &points)
Definition SimplePolygon.hpp:27
constexpr bool operator==(const SimplePolygon< U > &other) const noexcept
Definition SimplePolygon.hpp:48
SimplePolygon(std::initializer_list< Vec2D< T > > &&points)
Definition SimplePolygon.hpp:25
Implementation of a two-dimensional vector.
Definition Vec2D.hpp:16
Interface for a point.
Definition IPoint.hpp:92
Interface for a polygon A polygon is a two-dimensional shape defined by a boundary and zero or more h...
Definition IPolygon.hpp:98
A geometry enclosing an area: a ring, a polygon or a multi-polygon.
Definition IGeometry.hpp:23
Definition CollectionConcepts.hpp:39
Definition CollectionConcepts.hpp:45
Definition BoundingBoxWrapper.hpp:5
GeometryType
Definition GeometryBase.hpp:6
double DEFAULT_FLOATING_POINT
Definition NumericConcepts.hpp:12