28template <
class Po
intType = Po
int<>,
class Label>
33template <
class Po
intType>
36template <
class Po
intType,
class A>
39template <
class Number>
50template <
class Po
intType_,
class TLabel>
57 static_assert(detail::is_point_v<PointType>,
"Halfplane requires pgl::Point defining points");
94 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
96 : points_{std::move(
source), std::move(
target)}, label_(std::forward<A>(
label)) {}
100 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
110 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
111 requires(std::constructible_from<PointType, const OtherPointType&>)
114 label_ = detail::copyLabel<LabelType>(other);
118 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
119 requires(std::constructible_from<PointType, const OtherPointType&>)
123 label_ = detail::copyLabel<LabelType>(other);
135 return points_[
index];
140 return points_[
index];
146 static constexpr std::size_t
size() {
155 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
156 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
159 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
160 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
168 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t>(
size()); ++i) {
169 if ((*
this)[
static_cast<std::size_t
>(i)] == point) {
233 return points_.cbegin();
236 return points_.begin();
245 return points_.cbegin();
253 constexpr auto end()
const {
254 return points_.cend();
257 return points_.end();
266 return points_.cend();
280 template<AnyShapeConcept OtherShape>
281 [[nodiscard]]
constexpr bool samePointSet(
const OtherShape& other)
const;
300 template <
class A = LabelType>
301 requires(detail::has_label_v<A>)
372 template <
class OtherNumber>
376 template <
class OtherNumber>
380 template <
class OtherNumber>
384 template <
class OtherNumber>
388 template <
class OtherNumber>
392 template <
class OtherNumber>
396 template <
class OtherNumber>
400 template <
class OtherNumber>
439 template<Po
intConcept OtherPo
int>
443 template<Po
intConcept OtherPo
int>
450 template<SegmentConcept OtherSegment>
453 template<LineConcept OtherLine>
456 template<OrientedSegmentConcept OtherOrientedSegment>
459 template<OrientedLineConcept OtherOrientedLine>
462 template<RayConcept OtherRay>
465 template<RectangleConcept OtherRectangle>
468 template<TriangleConcept OtherTriangle>
471 template<HalfplaneConcept OtherHalfplane>
474 template<ConvexConcept OtherConvex>
476 return detail::reduceDegenerateGuarded(
477 other, [
this](
const auto& carrier) {
return this->
boundaryContains(carrier); });
480 template<PolygonConcept OtherPolygon>
482 return detail::reduceDegenerate(
483 other, [
this](
const auto& carrier) {
return this->
boundaryContains(carrier); });
486 template<DiskConcept OtherDisk>
488 return detail::reduceDegenerate(
489 other, [
this](
const auto& carrier) {
return this->
boundaryContains(carrier); });
493 template<Po
intConcept OtherPo
int>
494 [[nodiscard]]
constexpr bool contains(
const OtherPoint& point)
const;
497 template<LineConcept OtherLine>
498 [[nodiscard]]
constexpr bool contains(
const OtherLine& other)
const;
501 template<OrientedLineConcept OtherOrientedLine>
502 [[nodiscard]]
constexpr bool contains(
const OtherOrientedLine& other)
const;
505 template<SegmentConcept OtherSegment>
506 [[nodiscard]]
constexpr bool contains(
const OtherSegment& other)
const;
509 template<OrientedSegmentConcept OtherOrientedSegment>
510 [[nodiscard]]
constexpr bool contains(
const OtherOrientedSegment& other)
const;
513 template<RayConcept OtherRay>
514 [[nodiscard]]
constexpr bool contains(
const OtherRay& other)
const;
517 template<RectangleConcept OtherRectangle>
518 [[nodiscard]]
constexpr bool contains(
const OtherRectangle& other)
const;
521 template<HalfplaneConcept OtherHalfplane>
522 [[nodiscard]]
constexpr bool contains(
const OtherHalfplane& other)
const;
525 template<TriangleConcept OtherTriangle>
526 [[nodiscard]]
constexpr bool contains(
const OtherTriangle& other)
const;
529 template<ConvexConcept OtherConvex>
530 [[nodiscard]]
constexpr bool contains(
const OtherConvex& other)
const;
533 template<PolygonConcept OtherPolygon>
534 [[nodiscard]]
constexpr bool contains(
const OtherPolygon& other)
const;
537 template<DiskConcept OtherDisk>
538 [[nodiscard]]
constexpr bool contains(
const OtherDisk& other)
const;
551 template <
class EmptyPo
int>
556 template <
class EmptyPo
int>
561 template <
class EmptyPo
int>
566 template <
class EmptyPo
int>
572 template<Po
intConcept OtherPo
int>
576 template<LineConcept OtherLine>
580 template<OrientedLineConcept OtherOrientedLine>
584 template<SegmentConcept OtherSegment>
588 template<OrientedSegmentConcept OtherOrientedSegment>
592 template<RayConcept OtherRay>
596 template<RectangleConcept OtherRectangle>
600 template<HalfplaneConcept OtherHalfplane>
604 template<TriangleConcept OtherTriangle>
608 template<ConvexConcept OtherConvex>
612 template<DiskConcept OtherDisk>
616 template<Po
intConcept OtherPo
int>
617 [[nodiscard]]
constexpr bool intersects(
const OtherPoint& other)
const;
620 template<LineConcept OtherLine>
621 [[nodiscard]]
constexpr bool intersects(
const OtherLine& other)
const;
624 template<OrientedLineConcept OtherOrientedLine>
625 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedLine& other)
const;
628 template<SegmentConcept OtherSegment>
629 [[nodiscard]]
constexpr bool intersects(
const OtherSegment& other)
const;
632 template<OrientedSegmentConcept OtherOrientedSegment>
633 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedSegment& other)
const;
636 template<RayConcept OtherRay>
637 [[nodiscard]]
constexpr bool intersects(
const OtherRay& other)
const;
640 template<HalfplaneConcept OtherHalfplane>
641 [[nodiscard]]
constexpr bool intersects(
const OtherHalfplane& other)
const;
647 template<
typename OtherShape>
649 [[nodiscard]]
constexpr bool intersects(
const OtherShape& other)
const {
650 return other.intersects(*
this);
654 template <
class EmptyPo
int>
660 template<Po
intConcept OtherPo
int>
664 template<LineConcept OtherLine>
668 template<OrientedLineConcept OtherOrientedLine>
672 template<SegmentConcept OtherSegment>
676 template<OrientedSegmentConcept OtherOrientedSegment>
680 template<RayConcept OtherRay>
684 template<HalfplaneConcept OtherHalfplane>
688 template<
typename OtherShape>
691 return other.interiorsIntersect(*
this);
695 template <
class EmptyPo
int>
704 template<LineConcept OtherLine>
705 [[nodiscard]]
constexpr bool separates(
const OtherLine& other)
const;
708 template<Po
intConcept OtherPo
int>
709 [[nodiscard]]
constexpr bool separates(
const OtherPoint& other)
const;
712 template<OrientedLineConcept OtherOrientedLine>
713 [[nodiscard]]
constexpr bool separates(
const OtherOrientedLine& other)
const;
716 template<SegmentConcept OtherSegment>
717 [[nodiscard]]
constexpr bool separates(
const OtherSegment& other)
const;
720 template<OrientedSegmentConcept OtherOrientedSegment>
721 [[nodiscard]]
constexpr bool separates(
const OtherOrientedSegment& other)
const;
724 template<RayConcept OtherRay>
725 [[nodiscard]]
constexpr bool separates(
const OtherRay& other)
const;
728 template<RectangleConcept OtherRectangle>
729 [[nodiscard]]
constexpr bool separates(
const OtherRectangle& other)
const;
732 template<HalfplaneConcept OtherHalfplane>
733 [[nodiscard]]
constexpr bool separates(
const OtherHalfplane& other)
const;
736 template<TriangleConcept OtherTriangle>
737 [[nodiscard]]
constexpr bool separates(
const OtherTriangle& other)
const;
740 template<ConvexConcept OtherConvex>
741 [[nodiscard]]
constexpr bool separates(
const OtherConvex& other)
const;
744 template<PolygonConcept OtherPolygon>
745 [[nodiscard]]
constexpr bool separates(
const OtherPolygon& other)
const;
748 template<MonotoneChainConcept OtherChain>
749 [[nodiscard]]
constexpr bool contains(
const OtherChain& other)
const;
752 template<MonotoneChainConcept OtherChain>
756 template<MonotoneChainConcept OtherChain>
760 template<MonotoneChainConcept OtherChain>
761 [[nodiscard]]
constexpr bool separates(
const OtherChain& other)
const;
764 template<PolylineConcept OtherPolyline>
765 [[nodiscard]]
constexpr bool contains(
const OtherPolyline& other)
const;
768 template<PolylineConcept OtherPolyline>
772 template<PolylineConcept OtherPolyline>
776 template<PolylineConcept OtherPolyline>
777 [[nodiscard]]
constexpr bool separates(
const OtherPolyline& other)
const;
780 template<HalfplaneIntersectionConcept OtherRegion>
781 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
784 template<HalfplaneIntersectionConcept OtherRegion>
788 template<HalfplaneIntersectionConcept OtherRegion>
792 template<HalfplaneIntersectionConcept OtherRegion>
793 [[nodiscard]]
constexpr bool separates(
const OtherRegion& other)
const;
802 template<PolygonWithHolesConcept OtherRegion>
803 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
811 template<PolygonWithHolesConcept OtherRegion>
815 template<PolygonWithHolesConcept OtherRegion>
825 template<PolygonWithHolesConcept OtherRegion>
826 [[nodiscard]]
bool separates(
const OtherRegion& other)
const;
837 template<PolygonSetConcept OtherSet>
838 [[nodiscard]]
constexpr bool contains(
const OtherSet& other)
const {
839 for (
const auto& component : other) {
848 template<PolygonSetConcept OtherSet>
850 for (
const auto& component : other) {
859 template<PolygonSetConcept OtherSet>
861 for (
const auto& component : other) {
877 template<PolygonSetConcept OtherSet>
878 [[nodiscard]]
bool separates(
const OtherSet& other)
const;
881 template<DiskConcept OtherDisk>
882 [[nodiscard]]
constexpr bool separates(
const OtherDisk& other)
const;
889 template<PolygonConcept OtherPolygon>
894 template<LineConcept OtherLine>
895 [[nodiscard]]
constexpr bool crosses(
const OtherLine& other)
const;
898 template<Po
intConcept OtherPo
int>
899 [[nodiscard]]
constexpr bool crosses(
const OtherPoint& other)
const;
902 template<OrientedLineConcept OtherOrientedLine>
903 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedLine& other)
const;
906 template<SegmentConcept OtherSegment>
907 [[nodiscard]]
constexpr bool crosses(
const OtherSegment& other)
const;
910 template<OrientedSegmentConcept OtherOrientedSegment>
911 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedSegment& other)
const;
914 template<RayConcept OtherRay>
915 [[nodiscard]]
constexpr bool crosses(
const OtherRay& other)
const;
918 template<HalfplaneConcept OtherHalfplane>
919 [[nodiscard]]
constexpr bool crosses(
const OtherHalfplane& other)
const;
922 template<
typename OtherShape>
924 [[nodiscard]]
constexpr bool crosses(
const OtherShape& other)
const {
925 return other.crosses(*
this);
929 template <
class EmptyPo
int>
938 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
939 [[nodiscard]]
constexpr std::optional<Point<ResultNumber, typename PointType::LabelType>>
943 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
948 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
953 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
958 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
963 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
978 template <
class ResultNumber = NumberType, HalfplaneConcept OtherHalfplane>
983 template <
class ResultNumber = NumberType, HalfplaneIntersectionConcept OtherRegion>
984 [[nodiscard]]
constexpr auto intersection(
const OtherRegion& other)
const {
989 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
992 && (detail::shapeRank<OtherShape> > detail::shapeRank<Halfplane>)
993 &&
requires(
const OtherShape& o,
const Halfplane& self) {
996 [[nodiscard]]
constexpr auto intersection(
const OtherShape& other)
const {
1001 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1003 && (detail::shapeRank<OtherShape> > detail::shapeRank<Halfplane>)
1004 &&
requires(
const OtherShape& o,
const Halfplane& self) {
1012 template <
class ResultNumber = NumberType,
class EmptyPo
int>
1032 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1036 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1040 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1044 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1048 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1052 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1056 template <
class ResultNumber = division_result_t<NumberType>, HalfplaneConcept OtherHalfplane>
1065 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1066 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Halfplane>)
1067 &&
requires(
const OtherShape& o,
const Halfplane& self) {
1081 template <
class ResultNumber =
double,
class DiskPo
intType,
class DiskLabel>
1101 template <
class ResultNumber = division_result_t<NumberType>,
class OtherShape>
1102 requires detail::ClosestPointsPairConcept<Halfplane<PointType_, TLabel>, OtherShape>
1106 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1107 [[nodiscard]]
constexpr auto distanceL1(
const OtherPoint& point)
const;
1110 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1111 [[nodiscard]]
constexpr auto distanceL1(
const OtherSegment& other)
const;
1114 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1115 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedSegment& other)
const;
1118 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1119 [[nodiscard]]
constexpr auto distanceL1(
const OtherLine& other)
const;
1122 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1123 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedLine& other)
const;
1126 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1127 [[nodiscard]]
constexpr auto distanceL1(
const OtherRay& other)
const;
1130 template <
class ResultNumber = division_result_t<NumberType>, HalfplaneConcept OtherHalfplane>
1131 [[nodiscard]]
constexpr auto distanceL1(
const OtherHalfplane& other)
const;
1139 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1140 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Halfplane>)
1141 &&
requires(
const OtherShape& o,
const Halfplane& self) {
1144 [[nodiscard]]
constexpr auto distanceL1(
const OtherShape& other)
const {
1163 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1169 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1182 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1188 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1192 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1193 [[nodiscard]]
constexpr auto distanceLInf(
const OtherSegment& other)
const;
1196 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1197 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedSegment& other)
const;
1200 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1204 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1205 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedLine& other)
const;
1208 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1212 template <
class ResultNumber = division_result_t<NumberType>, HalfplaneConcept OtherHalfplane>
1213 [[nodiscard]]
constexpr auto distanceLInf(
const OtherHalfplane& other)
const;
1221 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1222 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Halfplane>)
1223 &&
requires(
const OtherShape& o,
const Halfplane& self) {
1238 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1251 template <
class ResultNumber = division_result_t<NumberType>>
1252 [[nodiscard]]
constexpr ResultNumber
slope()
const;
1275 template <
class OtherShape>
1302 template <
class OtherShape>
1321 template <
class ResultNumber =
double, DiskConcept OtherDisk>
1351 template <
class ResultNumber =
double, DiskConcept OtherDisk>
1356 template<Po
intConcept OtherPo
int>
1360 template<Po
intConcept OtherPo
int>
1364 template <
class Scalar>
1369 template <
class Scalar>
1378 template <
class ResultNumber = NumberType>
1388 template <
class OtherShape>
1393 std::array<PointType, 2> points_{};
1394 [[no_unique_address]]
mutable LabelType label_{};
1397template <
class Po
intType,
class LabelType,
class TranslationNumber,
class TranslationLabel>
1400template <
class Po
intType,
class LabelType,
class Scalar>
1404template <
class Scalar,
class Po
intType,
class LabelType>
1408template <
class Po
intType,
class LabelType,
class Scalar>
1412template <
class Po
intType,
class LabelType>
Definition forward.hpp:319
Shape pairs whose Minkowski sum Pangolin can represent.
Definition forward.hpp:476
Definition forward.hpp:306
Definition arrangement.hpp:67
HalfplaneIntersection() -> HalfplaneIntersection< Point<>, NoLabel >
Definition halfplaneintersection.hpp:2308
Line() -> Line< Point<>, NoLabel >
constexpr auto operator-(const Point< LeftNumber, LeftLabel > &left, const Point< RightNumber, RightLabel > &right)
Translates a point by the opposite of another point.
Definition transformations.hpp:130
std::ostream & operator<<(std::ostream &stream, const Point< Number, Label > &point)
Streams a point as (x,y) or label:(x,y).
Definition io.hpp:27
Halfplane() -> Halfplane< Point<>, NoLabel >
OrientedLine() -> OrientedLine< Point<>, NoLabel >
Public declaration of pgl::OrientedSegment.
Closed Euclidean disk stored by boundary points plus optional disk label.
Definition disk.hpp:66
The empty set of points in the plane.
Definition emptyshape.hpp:33
Intersection of closed half-planes; convex but possibly unbounded or empty.
Definition halfplaneintersection.hpp:244
Closed half-plane defined by an oriented boundary line.
Definition halfplane.hpp:51
constexpr Halfplane rotated90(int k=1) const
Returns the half-plane rotated by 90k degrees around the origin.
Definition transformations.hpp:1457
constexpr bool samePointSet(const OtherShape &other) const
Tests whether another shape defines exactly the same point set.
Definition samepointset.hpp:1977
constexpr bool boundaryContains(const OtherSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:414
auto regularizedIntersection(const Shape< OtherPoint > &other) const
Re-dispatches a regularized intersection through a runtime shape.
Definition halfplane.hpp:1170
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Line< Point< ResultNumber, typename PointType::LabelType > >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherOrientedLine &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:593
constexpr bool interiorContains(const OtherLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:667
constexpr bool separates(const OtherRectangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1417
constexpr Halfplane scaledDownY(const OtherNumber scalar) const
Returns the half-plane with its y-coordinates divided by a divisor.
constexpr auto operator<=>(const Halfplane &other) const
Provides an ordering compatible with half-plane equality.
Definition predicates.hpp:946
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1376
constexpr void scaleDownX(const OtherNumber scalar)
Divides the half-plane's x-coordinates by a divisor in place.
Definition transformations.hpp:1516
constexpr bool contains(const OtherOrientedLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:891
constexpr bool interiorContains(const OtherTriangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:782
constexpr bool interiorContains(const OtherRay &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:707
constexpr bool crosses(const OtherShape &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition halfplane.hpp:924
constexpr bool contains(const OtherSet &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition halfplane.hpp:838
constexpr bool boundaryContains(const OtherOrientedLine &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:432
constexpr bool intersects(const OtherRay &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:675
constexpr bool pointInsideInteriorContainedIn(const OtherShape &shape) const
Tests whether some point in this shape's relative interior lies in the strict interior of shape.
Definition measures.hpp:505
constexpr bool separates(const OtherPolygon &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1458
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Line< Point< ResultNumber, typename PointType::LabelType > >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherLine &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:538
constexpr auto end() const
Returns an iterator past the target defining point.
Definition halfplane.hpp:253
constexpr bool boundaryContains(const OtherSet &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition halfplane.hpp:849
constexpr bool separates(const OtherOrientedLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1389
constexpr bool interiorContains(const OtherConvex &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:737
constexpr bool intersects(const OtherOrientedLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:644
constexpr Halfplane & operator+=(const OtherPoint &translation)
Translates the half-plane by the given point in place.
constexpr bool interiorContains(const OtherPolygon &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1286
constexpr std::ptrdiff_t index(const PointType &point) const
Definition halfplane.hpp:167
constexpr Point< ResultNumber > pointInside() const
Returns a point inside the halfplane.
Definition measures.hpp:486
constexpr void scaleDownY(const OtherNumber scalar)
Divides the half-plane's y-coordinates by a divisor in place.
Definition transformations.hpp:1534
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition halfplane.hpp:562
constexpr bool contains(const OtherTriangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:969
constexpr HalfplaneIntersection< Point< ResultNumber, typename PointType::LabelType > > intersection(const OtherHalfplane &other) const
Returns the intersection of the two half-planes as a half-plane intersection.
Definition intersection.hpp:703
TLabel LabelType
Definition halfplane.hpp:54
constexpr auto distanceL1(const OtherLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:434
constexpr bool separates(const OtherTriangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1435
constexpr bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:4630
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1686
constexpr bool separates(const OtherConvex &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1442
constexpr bool contains(const OtherConvex &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:975
constexpr auto distanceLInf(const OtherPoint &point) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:395
constexpr bool separates(const OtherRay &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1410
constexpr auto squaredDistance(const OtherOrientedLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:427
constexpr auto squaredDistance(const OtherOrientedSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:409
static constexpr std::size_t size()
Returns the number of defining points (always 2).
Definition halfplane.hpp:146
constexpr void rotate90(int k=1)
Rotates the half-plane by 90k degrees around the origin in place.
Definition transformations.hpp:1462
constexpr bool boundaryContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition halfplane.hpp:557
constexpr bool interiorsIntersect(const OtherPoint &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:682
constexpr bool contains(const OtherSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:897
constexpr void scaleUpX(const OtherNumber scalar)
Multiplies the half-plane's x-coordinates by a factor in place.
Definition transformations.hpp:1480
constexpr auto intersection(const Shape< OtherPoint > &other) const
Returns the intersection of the two shapes (A ∩ B), re-dispatching through the wrapper's own intersec...
Definition halfplane.hpp:1164
constexpr bool contains(const OtherHalfplane &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:948
constexpr Halfplane(NumberType x1, NumberType y1, NumberType x2, NumberType y2)
Creates a half-plane from four coordinates.
Definition halfplane.hpp:83
constexpr const PointType & max() const
Returns the lexicographically largest defining point.
Definition halfplane.hpp:214
constexpr bool boundaryContains(const OtherPolygon &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition halfplane.hpp:481
constexpr auto begin() const
Returns an iterator to the source defining point.
Definition halfplane.hpp:232
constexpr bool interiorsIntersect(const OtherShape &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition halfplane.hpp:690
constexpr bool intersects(const OtherLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:628
constexpr auto begin()
Definition halfplane.hpp:235
constexpr Halfplane opposite() const
Returns the complementary half-plane with reversed boundary orientation.
Definition halfplane.hpp:223
constexpr bool boundaryContains(const OtherPolyline &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1293
constexpr A & label() const
Definition halfplane.hpp:302
constexpr bool contains(const Shape< PointType > &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1002
constexpr bool interiorContains(const OtherOrientedSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:698
constexpr auto intersection(const OtherShape &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition halfplane.hpp:996
constexpr bool separates(const Shape< PointType > &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1508
constexpr auto squaredDistance(const OtherPoint &point) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:391
constexpr bool contains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition halfplane.hpp:552
constexpr const PointType & min() const
Returns the lexicographically smallest defining point.
Definition halfplane.hpp:205
constexpr bool separates(const OtherPolyline &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3984
PointType::NumberType NumberType
Definition halfplane.hpp:53
constexpr PointType & get(std::ptrdiff_t index)
Definition halfplane.hpp:158
constexpr bool contains(const OtherRay &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:915
constexpr bool interiorsIntersect(const OtherOrientedLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:704
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:603
constexpr auto distanceLInf(const OtherLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:422
constexpr auto distanceL1(const OtherPoint &point) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:407
constexpr bool boundaryContains(const OtherLine &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:420
constexpr auto squaredDistance(const OtherShape &other) const
Returns the squared Euclidean distance to the given shape.
Definition halfplane.hpp:1070
constexpr bool interiorContains(const OtherOrientedLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:679
constexpr auto squaredDistance(const OtherHalfplane &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:445
constexpr PointType & source()
Definition halfplane.hpp:184
constexpr Halfplane(const Halfplane< OtherPointType, OtherLabelType > &other)
Converts a half-plane with a different point and/or label type.
Definition halfplane.hpp:112
constexpr std::optional< Point< ResultNumber, typename PointType::LabelType > > intersection(const OtherPoint &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:524
constexpr bool crosses(const Shape< PointType > &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:537
constexpr bool interiorContains(const OtherChain &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1499
constexpr bool boundaryContains(const OtherRectangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:444
constexpr auto distanceLInf(const Shape< OtherPoint > &other) const
Returns the distance to the given shape, using symmetry to re-dispatch through the wrapper's own dist...
Definition halfplane.hpp:1239
constexpr EmptyShape< EmptyPoint > intersection(const EmptyShape< EmptyPoint > &) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition halfplane.hpp:1013
constexpr Halfplane(NumberType x1, NumberType y1, NumberType x2, NumberType y2, A &&label)
Same as the four-coordinate constructor, and stores a label.
Definition halfplane.hpp:101
constexpr bool intersects(const OtherOrientedSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:666
constexpr Halfplane(PointType source, PointType target, A &&label)
Creates a half-plane from an oriented boundary and stores a label.
Definition halfplane.hpp:95
constexpr const PointType & get(std::ptrdiff_t index) const
Cyclic access: same as operator[] but index is taken modulo size(); negative indices wrap from the en...
Definition halfplane.hpp:154
constexpr bool intersects(const Shape< PointType > &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:702
constexpr bool boundaryContains(const OtherOrientedSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:426
constexpr bool interiorContains(const OtherPolyline &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1725
constexpr bool verticesContain(const OtherPoint &point) const
Returns whether the given point is one of the stored defining points.
Definition predicates.hpp:973
detail::promoted_number_t< NumberType > CoordinateType
Definition halfplane.hpp:55
constexpr PointType & operator[](std::size_t index)
Returns defining point 0 for the source and 1 for the target.
Definition halfplane.hpp:138
constexpr auto distanceLInf(const OtherShape &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition halfplane.hpp:1226
constexpr auto distanceL1(const Shape< OtherPoint > &other) const
Returns the distance to the given shape, using symmetry to re-dispatch through the wrapper's own dist...
Definition halfplane.hpp:1183
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:622
constexpr bool intersects(const EmptyShape< EmptyPoint > &) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition halfplane.hpp:655
constexpr bool isVertical() const
Returns whether the boundary line is vertical.
Definition predicates.hpp:962
constexpr bool interiorsIntersect(const Shape< PointType > &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:790
constexpr bool contains(const OtherLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:882
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherOrientedSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:650
constexpr bool interiorsIntersect(const OtherOrientedSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:732
constexpr bool operator==(const Halfplane &other) const
Tests equality of the represented half-plane.
Definition predicates.hpp:940
constexpr bool interiorsIntersect(const OtherLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:689
constexpr Halfplane & operator-=(const OtherPoint &translation)
Translates the half-plane by the negation of the given point in place.
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherRay &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:661
constexpr bool crosses(const EmptyShape< EmptyPoint > &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition halfplane.hpp:930
constexpr bool interiorsIntersect(const OtherSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:719
constexpr bool boundaryContains(const OtherTriangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:457
constexpr auto distanceL1(const OtherShape &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition halfplane.hpp:1144
constexpr auto regularizedIntersection(const OtherShape &other) const
Forwards a regularized intersection to the shape that owns it.
Definition halfplane.hpp:1007
constexpr auto distanceLInf(const OtherOrientedLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:431
constexpr const PointType & target() const
Definition halfplane.hpp:193
constexpr bool interiorsIntersect(const OtherRay &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:745
constexpr auto distanceLInf(const OtherOrientedSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:413
constexpr auto squaredDistance(const OtherRay &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:436
constexpr Halfplane(PointType source, PointType target)
Creates a half-plane from an oriented boundary line.
Definition halfplane.hpp:72
constexpr bool interiorsIntersect(const EmptyShape< EmptyPoint > &) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition halfplane.hpp:696
constexpr auto distanceLInf(const OtherSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:404
constexpr bool crosses(const OtherRay &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:524
constexpr bool separates(const OtherDisk &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1448
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:510
constexpr bool crosses(const OtherOrientedLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:503
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:872
constexpr bool boundaryContains(const OtherDisk &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition halfplane.hpp:487
constexpr bool intersects(const OtherSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:657
constexpr bool separates(const OtherHalfplane &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1428
constexpr auto closestPoints(const OtherShape &other) const
Returns the pair of points realizing the distance, nothing when the shapes meet.
Definition closest.hpp:475
constexpr bool intersects(const OtherHalfplane &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:688
constexpr bool contains(const OtherPolyline &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2411
bool separates(const OtherSet &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5951
constexpr bool contains(const OtherRectangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:931
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2786
constexpr auto distanceL1(const OtherRay &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:452
constexpr bool contains(const OtherChain &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2049
constexpr const PointType & operator[](std::size_t index) const
Returns defining point 0 for the source and 1 for the target.
Definition halfplane.hpp:133
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:496
constexpr bool contains(const OtherPolygon &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1756
constexpr bool separates(const OtherSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1396
detail::floating_result_t< ResultNumber > squaredDistance(const Disk< DiskPointType, DiskLabel > &disk) const
Returns the squared Euclidean distance to a disk.
Definition halfplane.hpp:1082
constexpr bool boundaryContains(const Shape< PointType > &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1125
constexpr Halfplane scaledDownX(const OtherNumber scalar) const
Returns the half-plane with its x-coordinates divided by a divisor.
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:405
constexpr bool isUndefined() const
Returns whether the half-plane is degenerate without collapsing to a point or to a segment.
Definition predicates.hpp:957
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2088
constexpr auto distanceL1(const OtherOrientedSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:425
constexpr PointType & target()
Definition halfplane.hpp:196
constexpr void scaleUpY(const OtherNumber scalar)
Multiplies the half-plane's y-coordinates by a factor in place.
Definition transformations.hpp:1498
constexpr bool separates(const OtherOrientedSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1403
constexpr bool interiorContains(const OtherSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:689
constexpr bool interiorContains(const OtherSet &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition halfplane.hpp:860
constexpr bool separates(const OtherChain &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3179
constexpr bool boundaryContains(const OtherChain &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1184
constexpr Halfplane scaledUpX(const OtherNumber scalar) const
Returns the half-plane with its x-coordinates multiplied by a factor.
constexpr bool interiorsIntersect(const OtherHalfplane &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:762
constexpr bool crosses(const OtherHalfplane &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:531
constexpr bool interiorContains(const OtherDisk &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:747
constexpr auto cend() const
Returns an iterator past the target defining point.
Definition halfplane.hpp:265
constexpr bool intersects(const OtherShape &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition halfplane.hpp:649
constexpr bool boundaryContains(const OtherHalfplane &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:466
constexpr auto distanceL1(const OtherOrientedLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:443
constexpr HalfplaneIntersection< PointType > asHalfplaneIntersection() const
Returns the half-plane as a half-plane intersection.
Definition halfplane.hpp:352
constexpr auto squaredDistance(const OtherSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:400
constexpr bool crosses(const OtherOrientedSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:517
constexpr auto minkowskiSum(const OtherShape &other) const
Returns the Minkowski sum of this shape and another (A ⊕ B).
Definition minkowski.hpp:799
constexpr bool separates(const OtherLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1382
constexpr auto intersection(const OtherRegion &other) const
Adds this half-plane to an existing half-plane intersection without deriving vertices.
Definition halfplane.hpp:984
constexpr Line< PointType > asLine() const
Returns the boundary line without orientation.
Definition halfplane.hpp:318
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:661
constexpr OrientedLine< PointType > asOrientedLine() const
Returns the oriented boundary line.
Definition halfplane.hpp:334
constexpr bool boundaryContains(const OtherRay &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:438
bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5695
constexpr bool isHorizontal() const
Returns whether the boundary line is horizontal.
Definition predicates.hpp:967
constexpr auto distanceL1(const OtherHalfplane &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:461
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:490
constexpr auto cbegin() const
Returns an iterator to the source defining point.
Definition halfplane.hpp:244
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
constexpr const PointType & source() const
Definition halfplane.hpp:181
constexpr bool isDegenerate() const
Returns whether the defining points coincide.
Definition predicates.hpp:952
constexpr auto minkowskiErosion(const OtherShape &other) const
Returns the Minkowski erosion of this shape by another (A ⊖ B).
Definition minkowskierosion.hpp:632
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition halfplane.hpp:567
Halfplane< Point< ResultNumber, typename PointType_::LabelType > > minkowskiSum(const OtherDisk &other) const
Returns the Minkowski sum of this half-plane and a disk (A ⊕ B), a half-plane.
Definition minkowski.hpp:837
constexpr ResultNumber slope() const
Returns the slope of the boundary line.
Definition measures.hpp:478
constexpr auto squaredDistance(const OtherLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:418
constexpr auto end()
Definition halfplane.hpp:256
constexpr bool contains(const OtherDisk &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:991
constexpr auto distanceLInf(const OtherRay &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:440
constexpr auto distanceL1(const OtherSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:416
constexpr bool interiorContains(const OtherHalfplane &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:765
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
constexpr bool interiorContains(const OtherRectangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:717
constexpr bool boundaryContains(const OtherConvex &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition halfplane.hpp:475
constexpr bool contains(const OtherOrientedSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:906
constexpr Halfplane()=default
Creates the degenerate half-plane (0,0)->(0,0).
constexpr auto distanceLInf(const OtherHalfplane &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:449
Halfplane< Point< ResultNumber, typename PointType_::LabelType > > minkowskiErosion(const OtherDisk &other) const
Returns the Minkowski erosion of this half-plane by a disk (A ⊖ B), a half-plane.
Definition minkowskierosion.hpp:772
constexpr Halfplane scaledUpY(const OtherNumber scalar) const
Returns the half-plane with its y-coordinates multiplied by a factor.
EPoint PointType
Definition halfplane.hpp:52
Unoriented infinite line.
Definition line.hpp:52
Sentinel type used when a point carries no extra label.
Definition point.hpp:31
Directed infinite line with left/right side semantics plus optional line label.
Definition orientedline.hpp:53
Two-dimensional point with optional label payload.
Definition point.hpp:129
ERational NumberType
Definition point.hpp:131
Half-infinite line starting from one source point plus optional ray label.
Definition ray.hpp:51
Unoriented closed segment between two endpoints plus optional segment label.
Definition segment.hpp:58
Runtime variant wrapper over the supported primitive shapes.
Definition shape.hpp:160