29template <
class Po
intType = Po
int<>,
class Label>
34template <
class Po
intType>
37template <
class Po
intType,
class A>
40template <
class Number>
52template <
class Po
intType_,
class TLabel>
59 static_assert(detail::is_point_v<PointType>,
"OrientedLine requires pgl::Point defining points");
96 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
98 : points_{std::move(
source), std::move(
target)}, label_(std::forward<A>(
label)) {}
102 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
112 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
113 requires(std::constructible_from<PointType, const OtherPointType&>)
116 label_ = detail::copyLabel<LabelType>(other);
120 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
121 requires(std::constructible_from<PointType, const OtherPointType&>)
125 label_ = detail::copyLabel<LabelType>(other);
137 return points_[
index];
142 return points_[
index];
148 static constexpr std::size_t
size() {
157 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
158 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
161 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
162 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
170 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t>(
size()); ++i) {
171 if ((*
this)[
static_cast<std::size_t
>(i)] == point) {
235 return points_.cbegin();
238 return points_.begin();
247 return points_.cbegin();
255 constexpr auto end()
const {
256 return points_.cend();
259 return points_.end();
268 return points_.cend();
283 template<AnyShapeConcept OtherShape>
284 [[nodiscard]]
constexpr bool samePointSet(
const OtherShape& other)
const;
303 template <
class A = LabelType>
304 requires(detail::has_label_v<A>)
366 template <
class ResultNumber = rational_
int_t<NumberType>>
368 && (detail::extended_integral<ResultNumber> || std::same_as<ResultNumber, BigInt>))
387 template<Po
intConcept OtherPo
int>
459 return px >= minX && px <= maxX && py >= minY && py <= maxY;
461 if (onOrInside(sx + a * dx, sy + a * dy)) { --a; }
462 if (onOrInside(sx + b * dx, sy + b * dy)) { ++b; }
485 template <
class OtherNumber>
489 template <
class OtherNumber>
493 template <
class OtherNumber>
497 template <
class OtherNumber>
501 template <
class OtherNumber>
505 template <
class OtherNumber>
509 template <
class OtherNumber>
513 template <
class OtherNumber>
524 template <
class ResultNumber = NumberType>
525 [[nodiscard]]
constexpr ResultNumber
area()
const;
571 template<Po
intConcept OtherPo
int>
575 template<Po
intConcept OtherPo
int>
580 template<SegmentConcept OtherSegment>
583 template<OrientedSegmentConcept OtherOrientedSegment>
584 [[nodiscard]]
constexpr bool boundaryContains(
const OtherOrientedSegment&)
const {
return false; }
586 template<LineConcept OtherLine>
589 template<OrientedLineConcept OtherOrientedLine>
590 [[nodiscard]]
constexpr bool boundaryContains(
const OtherOrientedLine&)
const {
return false; }
592 template<RayConcept OtherRay>
595 template<HalfplaneConcept OtherHalfplane>
596 [[nodiscard]]
constexpr bool boundaryContains(
const OtherHalfplane&)
const {
return false; }
598 template<RectangleConcept OtherRectangle>
599 [[nodiscard]]
constexpr bool boundaryContains(
const OtherRectangle&)
const {
return false; }
601 template<TriangleConcept OtherTriangle>
602 [[nodiscard]]
constexpr bool boundaryContains(
const OtherTriangle&)
const {
return false; }
604 template<ConvexConcept OtherConvex>
607 template<PolygonConcept OtherPolygon>
610 template<DiskConcept OtherDisk>
614 template<Po
intConcept OtherPo
int>
615 [[nodiscard]]
constexpr bool contains(
const OtherPoint& point)
const;
618 template<LineConcept OtherLine>
619 [[nodiscard]]
constexpr bool contains(
const OtherLine& other)
const;
622 template<OrientedLineConcept OtherOrientedLine>
623 [[nodiscard]]
constexpr bool contains(
const OtherOrientedLine& other)
const;
626 template<SegmentConcept OtherSegment>
627 [[nodiscard]]
constexpr bool contains(
const OtherSegment& other)
const;
630 template<OrientedSegmentConcept OtherOrientedSegment>
631 [[nodiscard]]
constexpr bool contains(
const OtherOrientedSegment& other)
const;
634 template<RayConcept OtherRay>
635 [[nodiscard]]
constexpr bool contains(
const OtherRay& other)
const;
638 template<HalfplaneConcept OtherHalfplane>
639 [[nodiscard]]
constexpr bool contains(
const OtherHalfplane& other)
const;
642 template<RectangleConcept OtherRectangle>
643 [[nodiscard]]
constexpr bool contains(
const OtherRectangle& other)
const;
646 template<TriangleConcept OtherTriangle>
647 [[nodiscard]]
constexpr bool contains(
const OtherTriangle& other)
const;
650 template<ConvexConcept OtherConvex>
651 [[nodiscard]]
constexpr bool contains(
const OtherConvex& other)
const;
654 template<PolygonConcept OtherPolygon>
655 [[nodiscard]]
constexpr bool contains(
const OtherPolygon& other)
const;
658 template<DiskConcept OtherDisk>
659 [[nodiscard]]
constexpr bool contains(
const OtherDisk& other)
const;
672 template <
class EmptyPo
int>
677 template <
class EmptyPo
int>
682 template <
class EmptyPo
int>
687 template <
class EmptyPo
int>
693 template<Po
intConcept OtherPo
int>
697 template<LineConcept OtherLine>
701 template<OrientedLineConcept OtherOrientedLine>
705 template<SegmentConcept OtherSegment>
709 template<OrientedSegmentConcept OtherOrientedSegment>
713 template<RayConcept OtherRay>
717 template<HalfplaneConcept OtherHalfplane>
721 template<RectangleConcept OtherRectangle>
725 template<TriangleConcept OtherTriangle>
729 template<Po
intConcept OtherPo
int>
730 [[nodiscard]]
constexpr bool collinear(
const OtherPoint& point)
const;
733 template<LineConcept OtherLine>
734 [[nodiscard]]
constexpr bool collinear(
const OtherLine& other)
const;
737 template<OrientedLineConcept OtherOrientedLine>
738 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedLine& other)
const;
741 template<SegmentConcept OtherSegment>
742 [[nodiscard]]
constexpr bool collinear(
const OtherSegment& other)
const;
745 template<OrientedSegmentConcept OtherOrientedSegment>
746 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedSegment& other)
const;
749 template<RayConcept OtherRay>
750 [[nodiscard]]
constexpr bool collinear(
const OtherRay& other)
const;
763 template<Po
intConcept OtherPo
int>
764 [[nodiscard]]
constexpr std::partial_ordering
orientation(
const OtherPoint& point)
const;
774 template <
class ResultNumber = division_result_t<NumberType>>
775 [[nodiscard]]
constexpr ResultNumber
slope()
const;
789 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
790 [[nodiscard]]
constexpr std::optional<ResultNumber>
yAtX(
const OtherNumber&
x)
const;
804 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
805 [[nodiscard]]
constexpr std::optional<ResultNumber>
xAtY(
const OtherNumber&
y)
const;
842 template<LineConcept OtherLine>
843 [[nodiscard]]
constexpr bool parallel(
const OtherLine& other)
const;
846 template<OrientedLineConcept OtherOrientedLine>
847 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedLine& other)
const;
850 template<SegmentConcept OtherSegment>
851 [[nodiscard]]
constexpr bool parallel(
const OtherSegment& other)
const;
854 template<OrientedSegmentConcept OtherOrientedSegment>
855 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedSegment& other)
const;
858 template<RayConcept OtherRay>
859 [[nodiscard]]
constexpr bool parallel(
const OtherRay& other)
const;
862 template<Po
intConcept OtherPo
int>
863 [[nodiscard]]
constexpr bool intersects(
const OtherPoint& other)
const;
866 template<LineConcept OtherLine>
867 [[nodiscard]]
constexpr bool intersects(
const OtherLine& other)
const;
870 template<OrientedLineConcept OtherOrientedLine>
871 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedLine& other)
const;
874 template<SegmentConcept OtherSegment>
875 [[nodiscard]]
constexpr bool intersects(
const OtherSegment& other)
const;
878 template<OrientedSegmentConcept OtherOrientedSegment>
879 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedSegment& other)
const;
885 template<
typename OtherShape>
887 [[nodiscard]]
constexpr bool intersects(
const OtherShape& other)
const {
888 return other.intersects(*
this);
892 template <
class EmptyPo
int>
898 template<Po
intConcept OtherPo
int>
902 template<LineConcept OtherLine>
906 template<OrientedLineConcept OtherOrientedLine>
910 template<SegmentConcept OtherSegment>
914 template<OrientedSegmentConcept OtherOrientedSegment>
918 template<
typename OtherShape>
921 return other.interiorsIntersect(*
this);
925 template <
class EmptyPo
int>
934 template<LineConcept OtherLine>
935 [[nodiscard]]
constexpr bool crosses(
const OtherLine& other)
const;
938 template<OrientedLineConcept OtherOrientedLine>
939 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedLine& other)
const;
942 template<Po
intConcept OtherPo
int>
943 [[nodiscard]]
constexpr bool crosses(
const OtherPoint& other)
const;
946 template<SegmentConcept OtherSegment>
947 [[nodiscard]]
constexpr bool crosses(
const OtherSegment& other)
const;
950 template<OrientedSegmentConcept OtherOrientedSegment>
951 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedSegment& other)
const;
954 template<
typename OtherShape>
956 [[nodiscard]]
constexpr bool crosses(
const OtherShape& other)
const {
957 return other.crosses(*
this);
961 template <
class EmptyPo
int>
979 template<LineConcept OtherLine>
980 [[nodiscard]]
constexpr std::partial_ordering
984 template<Po
intConcept OtherPo
int>
985 [[nodiscard]]
constexpr bool separates(
const OtherPoint& other)
const;
988 template<SegmentConcept OtherSegment>
989 [[nodiscard]]
constexpr bool separates(
const OtherSegment& other)
const;
992 template<OrientedSegmentConcept OtherOrientedSegment>
993 [[nodiscard]]
constexpr bool separates(
const OtherOrientedSegment& other)
const;
996 template<LineConcept OtherLine>
997 [[nodiscard]]
constexpr bool separates(
const OtherLine& other)
const;
1000 template<OrientedLineConcept OtherOrientedLine>
1001 [[nodiscard]]
constexpr bool separates(
const OtherOrientedLine& other)
const;
1004 template<RayConcept OtherRay>
1005 [[nodiscard]]
constexpr bool separates(
const OtherRay& other)
const;
1008 template<RectangleConcept OtherRectangle>
1009 [[nodiscard]]
constexpr bool separates(
const OtherRectangle& other)
const;
1012 template<TriangleConcept OtherTriangle>
1013 [[nodiscard]]
constexpr bool separates(
const OtherTriangle& other)
const;
1016 template<HalfplaneConcept OtherHalfplane>
1017 [[nodiscard]]
constexpr bool separates(
const OtherHalfplane& other)
const;
1020 template<ConvexConcept OtherConvex>
1021 [[nodiscard]]
constexpr bool separates(
const OtherConvex& other)
const;
1024 template<DiskConcept OtherDisk>
1025 [[nodiscard]]
constexpr bool separates(
const OtherDisk& other)
const;
1028 template<PolygonConcept OtherPolygon>
1029 [[nodiscard]]
constexpr bool separates(
const OtherPolygon& other)
const;
1032 template<MonotoneChainConcept OtherChain>
1033 [[nodiscard]]
constexpr bool contains(
const OtherChain& other)
const;
1036 template<MonotoneChainConcept OtherChain>
1040 template<MonotoneChainConcept OtherChain>
1044 template<MonotoneChainConcept OtherChain>
1045 [[nodiscard]]
constexpr bool separates(
const OtherChain& other)
const;
1048 template<PolylineConcept OtherPolyline>
1049 [[nodiscard]]
constexpr bool contains(
const OtherPolyline& other)
const;
1052 template<PolylineConcept OtherPolyline>
1056 template<PolylineConcept OtherPolyline>
1060 template<PolylineConcept OtherPolyline>
1061 [[nodiscard]]
constexpr bool separates(
const OtherPolyline& other)
const;
1064 template<HalfplaneIntersectionConcept OtherRegion>
1065 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
1068 template<HalfplaneIntersectionConcept OtherRegion>
1072 template<HalfplaneIntersectionConcept OtherRegion>
1076 template<HalfplaneIntersectionConcept OtherRegion>
1077 [[nodiscard]]
constexpr bool separates(
const OtherRegion& other)
const;
1086 template<PolygonWithHolesConcept OtherRegion>
1087 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
1095 template<PolygonWithHolesConcept OtherRegion>
1099 template<PolygonWithHolesConcept OtherRegion>
1109 template<PolygonWithHolesConcept OtherRegion>
1110 [[nodiscard]]
bool separates(
const OtherRegion& other)
const;
1121 template<PolygonSetConcept OtherSet>
1122 [[nodiscard]]
constexpr bool contains(
const OtherSet& other)
const {
1123 for (
const auto& component : other) {
1132 template<PolygonSetConcept OtherSet>
1134 for (
const auto& component : other) {
1143 template<PolygonSetConcept OtherSet>
1145 for (
const auto& component : other) {
1161 template<PolygonSetConcept OtherSet>
1169 template<DiskConcept OtherDisk>
1173 template<ConvexConcept OtherConvex>
1177 template<PolygonConcept OtherPolygon>
1182 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
1183 [[nodiscard]]
constexpr std::optional<Point<ResultNumber, typename PointType::LabelType>>
1187 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1192 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1197 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1198 [[nodiscard]]
constexpr auto intersection(
const OtherSegment& other)
const;
1201 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1202 [[nodiscard]]
constexpr auto intersection(
const OtherOrientedSegment& other)
const;
1205 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1207 && (detail::shapeRank<OtherShape> > detail::shapeRank<OrientedLine>)
1208 &&
requires(
const OtherShape& o,
const OrientedLine& self) {
1216 template <
class ResultNumber = NumberType,
class EmptyPo
int>
1232 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1236 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1240 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1244 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1248 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1257 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1258 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedLine>)
1259 &&
requires(
const OtherShape& o,
const OrientedLine& self) {
1273 template <
class ResultNumber =
double,
class DiskPo
intType,
class DiskLabel>
1293 template <
class ResultNumber = division_result_t<NumberType>,
class OtherShape>
1294 requires detail::ClosestPointsPairConcept<OrientedLine<PointType_, TLabel>, OtherShape>
1298 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1299 [[nodiscard]]
constexpr auto distanceL1(
const OtherPoint& point)
const;
1302 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1303 [[nodiscard]]
constexpr auto distanceL1(
const OtherLine& other)
const;
1306 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1307 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedLine& other)
const;
1310 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1311 [[nodiscard]]
constexpr auto distanceL1(
const OtherSegment& other)
const;
1314 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1315 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedSegment& other)
const;
1323 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1324 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedLine>)
1325 &&
requires(
const OtherShape& o,
const OrientedLine& self) {
1328 [[nodiscard]]
constexpr auto distanceL1(
const OtherShape& other)
const {
1347 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1360 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1366 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1370 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1374 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1375 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedLine& other)
const;
1378 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1379 [[nodiscard]]
constexpr auto distanceLInf(
const OtherSegment& other)
const;
1382 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1383 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedSegment& other)
const;
1391 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1392 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedLine>)
1393 &&
requires(
const OtherShape& o,
const OrientedLine& self) {
1408 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1429 template <
class OtherShape>
1456 template <
class OtherShape>
1461 template<Po
intConcept OtherPo
int>
1465 template<Po
intConcept OtherPo
int>
1469 template <
class Scalar>
1474 template <
class Scalar>
1485 template <
class ResultNumber = NumberType>
1495 template <
class OtherShape>
1499 template <
class OtherNumber>
1500 using promoted_number_t = std::common_type_t<CoordinateType, detail::promoted_number_t<OtherNumber>>;
1502 std::array<PointType, 2> points_{};
1503 [[no_unique_address]]
mutable LabelType label_{};
1506template <
class Po
intType,
class LabelType,
class TranslationNumber,
class TranslationLabel>
1509template <
class Po
intType,
class LabelType,
class Scalar>
1513template <
class Scalar,
class Po
intType,
class LabelType>
1517template <
class Po
intType,
class LabelType,
class Scalar>
1521template <
class Po
intType,
class LabelType>
Shape pairs whose Minkowski sum Pangolin can represent.
Definition forward.hpp:476
Definition forward.hpp:306
Public declaration of pgl::Line.
Definition arrangement.hpp:67
@ y
Definition intervaltree.hpp:24
@ x
Definition intervaltree.hpp:24
constexpr bool is_Rational_v
Definition rational.hpp:37
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
OrientedSegment() -> OrientedSegment< Point<>, NoLabel >
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
OrientedLine() -> OrientedLine< Point<>, NoLabel >
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
Closed half-plane defined by an oriented boundary line.
Definition halfplane.hpp:51
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
constexpr bool contains(const OtherChain &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2032
constexpr bool interiorsIntersect(const EmptyShape< EmptyPoint > &) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition orientedline.hpp:926
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:253
constexpr bool separates(const OtherPolygon &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:2003
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 > > > > intersection(const OtherOrientedLine &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:300
constexpr bool boundaryContains(const OtherPolyline &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:1053
constexpr bool collinear(const OtherLine &other) const
Returns whether the given line is collinear with the oriented line.
Definition predicates.hpp:622
constexpr bool separates(const OtherOrientedLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:926
constexpr auto squaredDistance(const OtherOrientedLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:279
constexpr bool interiorsIntersect(const OtherShape &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition orientedline.hpp:920
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:531
constexpr bool intersects(const EmptyShape< EmptyPoint > &) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition orientedline.hpp:893
constexpr auto intersection(const OtherShape &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition orientedline.hpp:1211
constexpr bool separates(const OtherOrientedSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:914
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 orientedline.hpp:1409
constexpr bool interiorContains(const OtherPolyline &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1705
constexpr bool operator==(const OrientedLine &other) const
Tests equality of the represented oriented line.
Definition predicates.hpp:565
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition orientedline.hpp:688
constexpr OrientedLine scaledUpY(const OtherNumber scalar) const
Returns the line with its y-coordinates multiplied by a factor.
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1668
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:241
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
constexpr bool separates(const OtherDisk &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:966
constexpr ResultNumber slope() const
Returns the slope of the line.
Definition measures.hpp:224
constexpr void scaleUpY(const OtherNumber scalar)
Multiplies the line's y-coordinates by a factor in place.
Definition transformations.hpp:685
constexpr bool boundaryContains(const Shape< PointType > &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1107
constexpr bool crosses(const Shape< PointType > &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:282
constexpr auto intersection(const OtherSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:307
constexpr OrientedLine & operator-=(const OtherPoint &translation)
Translates the oriented line by the negation of the given point in place.
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:271
constexpr Point< ResultNumber > pointInside() const
Returns a point inside the oriented line.
Definition measures.hpp:232
constexpr Halfplane< PointType > leftHalfplane() const
Returns the half-plane on the left of the oriented line.
Definition predicates.hpp:702
constexpr auto end()
Definition orientedline.hpp:258
constexpr bool interiorsIntersect(const Shape< PointType > &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:410
constexpr NumberType twiceArea() const
Returns twice the area of the line.
Definition measures.hpp:218
constexpr bool interiorContains(const OtherSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:413
constexpr bool interiorContains(const OtherSet &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition orientedline.hpp:1144
bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5677
PointType PointType
Definition orientedline.hpp:54
constexpr auto distanceLInf(const OtherOrientedSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:318
constexpr bool boundaryContains(const OtherTriangle &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:602
constexpr PointType & target()
Definition orientedline.hpp:198
constexpr bool separates(const OtherSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:908
constexpr bool separates(const OtherLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:920
constexpr const PointType & operator[](std::size_t index) const
Returns defining point 0 for the source and 1 for the target.
Definition orientedline.hpp:135
constexpr const PointType & target() const
Definition orientedline.hpp:195
constexpr PointType & get(std::ptrdiff_t index)
Definition orientedline.hpp:160
constexpr bool interiorContains(const OtherPolygon &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1259
constexpr bool intersects(const OtherShape &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition orientedline.hpp:887
constexpr bool parallel(const OtherSegment &other) const
Returns whether the given segment is parallel to the oriented line.
Definition predicates.hpp:670
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:280
constexpr OrientedLine(const OrientedLine< OtherPointType, OtherLabelType > &other)
Converts an oriented line with a different point and/or label type.
Definition orientedline.hpp:114
constexpr Halfplane< PointType > rightHalfplane() const
Returns the half-plane on the right of the oriented line.
Definition predicates.hpp:697
constexpr auto operator<=>(const OrientedLine &other) const
Provides an ordering compatible with oriented-line equality.
Definition predicates.hpp:570
constexpr bool intersects(const Shape< PointType > &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:393
constexpr OrientedLine scaledDownX(const OtherNumber scalar) const
Returns the line with its x-coordinates divided by a divisor.
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:265
constexpr bool interiorContains(const OtherRay &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:425
constexpr bool collinear(const OtherPoint &point) const
Returns whether the given point is collinear with the oriented line.
Definition predicates.hpp:616
constexpr std::partial_ordering crossingOrder(const OtherLine &first, const OtherLine &second) const
Orders two lines by where they cross this oriented line.
Definition crosses.hpp:293
constexpr bool interiorContains(const OtherTriangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:448
constexpr bool contains(const OtherPolygon &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1734
constexpr auto squaredDistance(const OtherSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:285
constexpr bool interiorsIntersect(const OtherOrientedLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:393
constexpr bool boundaryContains(const OtherHalfplane &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:596
constexpr void rotate90(int k=1)
Rotates the oriented line by 90k degrees around the origin in place.
Definition transformations.hpp:659
constexpr auto distanceLInf(const OtherLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:300
constexpr auto intersection(const OtherOrientedSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:313
constexpr bool crosses(const OtherOrientedLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:259
constexpr bool boundaryContains(const OtherRectangle &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:599
constexpr bool interiorContains(const OtherOrientedLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:407
constexpr bool interiorContains(const OtherLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:401
constexpr bool contains(const OtherOrientedLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:543
constexpr bool contains(const OtherOrientedSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:555
static constexpr std::size_t size()
Returns the number of defining points (always 2).
Definition orientedline.hpp:148
constexpr bool verticesContain(const OtherPoint &point) const
Returns whether the given point is one of the stored defining points.
Definition predicates.hpp:610
constexpr A & label() const
Definition orientedline.hpp:305
constexpr bool collinear(const OtherOrientedLine &other) const
Returns whether another oriented line is collinear with this oriented line.
Definition predicates.hpp:628
constexpr auto squaredDistance(const OtherPoint &point) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:267
constexpr bool boundaryContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:678
constexpr bool contains(const OtherLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:537
constexpr auto squaredDistance(const OtherShape &other) const
Returns the squared Euclidean distance to the given shape.
Definition orientedline.hpp:1262
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:238
constexpr bool contains(const OtherTriangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:584
constexpr auto begin() const
Returns an iterator to the source defining point.
Definition orientedline.hpp:234
constexpr auto minkowskiSum(const OtherShape &other) const
Returns the Minkowski sum of this shape and another (A ⊕ B).
Definition minkowski.hpp:797
constexpr std::optional< ResultNumber > xAtY(const OtherNumber &y) const
Returns the x-coordinate of the supporting line at a given y-coordinate, if defined.
Definition atxy.hpp:226
constexpr auto distanceLInf(const OtherSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:312
constexpr bool contains(const OtherRay &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:561
constexpr bool separates(const OtherRectangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:938
constexpr bool parallel(const OtherRay &other) const
Returns whether the given ray is parallel to the oriented line.
Definition predicates.hpp:682
constexpr bool collinear(const OtherRay &other) const
Returns whether the given ray is collinear with the oriented line.
Definition predicates.hpp:646
constexpr OrientedLine(PointType source, PointType target)
Creates an oriented line from two defining points.
Definition orientedline.hpp:74
constexpr auto distanceL1(const OtherOrientedSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:330
constexpr const PointType & max() const
Returns the lexicographically largest defining point.
Definition orientedline.hpp:216
std::optional< OrientedLine< Point< ResultNumber, typename PointType_::LabelType >, TLabel > > integralLine() const
Returns an equal oriented line whose defining points have integer coordinates, when one exists.
Definition transformations.hpp:840
detail::floating_result_t< ResultNumber > squaredDistance(const Disk< DiskPointType, DiskLabel > &disk) const
Returns the squared Euclidean distance to a disk.
Definition orientedline.hpp:1274
constexpr bool boundaryContains(const OtherOrientedLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:590
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition orientedline.hpp:683
constexpr OrientedLine opposite() const
Returns the opposite orientation of the same geometric line.
Definition orientedline.hpp:225
constexpr bool interiorContains(const OtherHalfplane &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:431
constexpr auto distanceL1(const OtherShape &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition orientedline.hpp:1328
constexpr bool contains(const OtherPolyline &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2394
constexpr auto cend() const
Returns an iterator past the target defining point.
Definition orientedline.hpp:267
constexpr OrientedLine scaledDownY(const OtherNumber scalar) const
Returns the line with its y-coordinates divided by a divisor.
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 orientedline.hpp:1348
constexpr bool contains(const OtherDisk &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:604
constexpr bool interiorsIntersect(const OtherLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:387
constexpr ResultNumber area() const
Returns the area of the line.
Definition measures.hpp:213
constexpr OrientedLine & operator+=(const OtherPoint &translation)
Translates the oriented line by the given point in place.
constexpr bool boundaryContains(const OtherLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:587
bool separates(const OtherSet &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5936
constexpr bool contains(const OtherHalfplane &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:567
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:902
constexpr bool parallel(const OtherOrientedLine &other) const
Returns whether another oriented line is parallel to this oriented line.
Definition predicates.hpp:664
constexpr OrientedLine scaledUpX(const OtherNumber scalar) const
Returns the line with its x-coordinates multiplied by a factor.
constexpr OrientedLine()=default
Creates the degenerate oriented line (0,0)--(0,0).
constexpr bool contains(const OtherSet &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition orientedline.hpp:1122
constexpr bool boundaryContains(const OtherSegment &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:581
constexpr EmptyShape< EmptyPoint > intersection(const EmptyShape< EmptyPoint > &) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition orientedline.hpp:1217
constexpr bool separates(const OtherTriangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:948
constexpr std::partial_ordering orientation(const OtherPoint &point) const
Returns the orientation sign of a point with respect to the line.
Definition predicates.hpp:652
constexpr bool separates(const OtherHalfplane &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:954
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Line< 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:290
constexpr bool intersects(const OtherOrientedSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:388
constexpr bool isDegenerate() const
Returns whether the defining points coincide.
Definition predicates.hpp:583
constexpr bool samePointSet(const OtherShape &other) const
Tests whether another shape defines exactly the same point set.
Definition samepointset.hpp:1965
constexpr auto cbegin() const
Returns an iterator to the source defining point.
Definition orientedline.hpp:246
constexpr bool contains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition orientedline.hpp:673
constexpr bool contains(const OtherConvex &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:590
constexpr bool separates(const OtherConvex &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:960
constexpr auto closestPoints(const OtherShape &other) const
Returns the pair of points realizing the distance, nothing when the shapes meet.
Definition closest.hpp:461
constexpr bool boundaryContains(const OtherDisk &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:611
constexpr std::ptrdiff_t index(const PointType &point) const
Definition orientedline.hpp:169
constexpr bool contains(const OtherSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:549
constexpr bool contains(const Shape< PointType > &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:609
constexpr Line< PointType > asLine() const
Returns the line without orientation.
Definition orientedline.hpp:321
constexpr bool crosses(const OtherOrientedSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:277
constexpr bool separates(const OtherRay &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:932
constexpr OrientedLine rotated90(int k=1) const
Returns the oriented line rotated by 90k degrees around the origin.
Definition transformations.hpp:654
constexpr PointType & operator[](std::size_t index)
Returns defining point 0 for the source and 1 for the target.
Definition orientedline.hpp:140
constexpr bool interiorContains(const OtherDisk &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1253
constexpr bool interiorsIntersect(const OtherOrientedSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:405
constexpr bool interiorContains(const OtherChain &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1482
constexpr bool interiorsIntersect(const OtherPoint &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:381
constexpr bool boundaryContains(const OtherChain &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:1037
constexpr void scaleDownX(const OtherNumber scalar)
Divides the line's x-coordinates by a divisor in place.
Definition transformations.hpp:698
constexpr void scaleDownY(const OtherNumber scalar)
Divides the line's y-coordinates by a divisor in place.
Definition transformations.hpp:711
constexpr auto distanceLInf(const OtherPoint &point) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:294
constexpr auto distanceL1(const OtherOrientedLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:318
constexpr bool interiorContains(const OtherOrientedSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:419
PointType::NumberType NumberType
Definition orientedline.hpp:55
TLabel LabelType
Definition orientedline.hpp:56
constexpr bool boundaryContains(const OtherPolygon &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:608
constexpr bool interiorContains(const OtherConvex &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:454
constexpr const PointType & source() const
Definition orientedline.hpp:183
constexpr bool interiorsIntersect(const OtherSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:399
constexpr bool separates(const OtherPolyline &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3972
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:395
constexpr bool boundaryContains(const OtherConvex &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:605
constexpr auto distanceL1(const OtherLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:312
constexpr auto distanceL1(const OtherPoint &point) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:306
constexpr OrientedLine(NumberType x1, NumberType y1, NumberType x2, NumberType y2, A &&label)
Same as the four-coordinate constructor, and stores a label.
Definition orientedline.hpp:103
constexpr Halfplane< PointType > halfplaneBelow() const
Returns the half-plane geometrically below the supporting line.
Definition predicates.hpp:692
constexpr bool collinear(const OtherSegment &other) const
Returns whether the given segment is collinear with the oriented line.
Definition predicates.hpp:634
constexpr bool isUndefined() const
Returns whether the line is degenerate without collapsing to a point or to a segment.
Definition predicates.hpp:588
constexpr void scaleUpX(const OtherNumber scalar)
Multiplies the line's x-coordinates by a factor in place.
Definition transformations.hpp:672
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:364
constexpr std::optional< ResultNumber > yAtX(const OtherNumber &x) const
Returns the y-coordinate of the supporting line at a given x-coordinate, if defined.
Definition atxy.hpp:208
constexpr bool crosses(const EmptyShape< EmptyPoint > &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition orientedline.hpp:962
constexpr bool boundaryContains(const OtherSet &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:1133
constexpr bool intersects(const OtherSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:382
constexpr auto distanceLInf(const OtherShape &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition orientedline.hpp:1396
constexpr bool isVertical() const
Returns whether the line is vertical.
Definition predicates.hpp:593
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2765
constexpr const PointType & min() const
Returns the lexicographically smallest defining point.
Definition orientedline.hpp:207
constexpr OrientedLine(PointType source, PointType target, A &&label)
Creates an oriented line from two defining points and stores a label.
Definition orientedline.hpp:97
constexpr bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:4606
constexpr OrientedLine(NumberType x1, NumberType y1, NumberType x2, NumberType y2)
Creates an oriented line from four coordinates.
Definition orientedline.hpp:85
constexpr auto distanceL1(const OtherSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:324
constexpr auto minkowskiErosion(const OtherShape &other) const
Returns the Minkowski erosion of this shape by another (A ⊖ B).
Definition minkowskierosion.hpp:630
constexpr bool boundaryContains(const OtherRay &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:593
constexpr bool separates(const OtherChain &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3167
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
constexpr bool parallel(const OtherOrientedSegment &other) const
Returns whether the given oriented segment is parallel to the oriented line.
Definition predicates.hpp:676
constexpr auto begin()
Definition orientedline.hpp:237
constexpr bool contains(const OtherRectangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:573
constexpr bool isHorizontal() const
Returns whether the line is horizontal.
Definition predicates.hpp:598
constexpr Halfplane< PointType > halfplaneAbove() const
Returns the half-plane geometrically above the supporting line.
Definition predicates.hpp:687
constexpr bool collinear(const OtherOrientedSegment &other) const
Returns whether the given oriented segment is collinear with the oriented line.
Definition predicates.hpp:640
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 orientedline.hpp:1361
constexpr auto end() const
Returns an iterator past the target defining point.
Definition orientedline.hpp:255
constexpr bool interiorContains(const OtherRectangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:437
detail::promoted_number_t< NumberType > CoordinateType
Definition orientedline.hpp:57
constexpr bool parallel(const OtherLine &other) const
Returns whether the given line is parallel to the oriented line.
Definition predicates.hpp:658
constexpr bool boundaryContains(const OtherOrientedSegment &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedline.hpp:584
constexpr bool crosses(const OtherShape &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition orientedline.hpp:956
constexpr PointType & source()
Definition orientedline.hpp:186
constexpr OrientedSegment< PointType > asOrientedSegmentFor(const Rectangle< OtherPoint > &rect) const
Returns the oriented segment that intersects r the same way as this oriented line.
Definition orientedline.hpp:388
constexpr auto squaredDistance(const OtherOrientedSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:291
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 orientedline.hpp:156
constexpr bool separates(const Shape< PointType > &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:971
constexpr bool intersects(const OtherOrientedLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:376
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2070
constexpr bool intersects(const OtherLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:370
constexpr auto distanceLInf(const OtherOrientedLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:306
constexpr auto squaredDistance(const OtherLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:273
Directed segment preserving source-to-target order plus optional segment label.
Definition orientedsegment.hpp:44
Two-dimensional point with optional label payload.
Definition point.hpp:129
Axis-aligned rectangle stored by minimum and maximum corners.
Definition rectangle.hpp:75
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:502
constexpr const PointType & min() const
Returns the minimum corner (min x, min y).
Definition rectangle.hpp:347
constexpr const PointType & max() const
Returns the maximum corner (max x, max y).
Definition rectangle.hpp:359
Runtime variant wrapper over the supported primitive shapes.
Definition shape.hpp:160