16template <
class Po
intType = Po
int<>,
class Label>
21template <
class Po
intType>
24template <
class Po
intType,
class A>
27template <
class Number>
43template <
class Po
intType_,
class TLabel>
49 static_assert(detail::is_point_v<PointType>,
"OrientedSegment requires pgl::Point endpoints");
89 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
95 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
105 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
106 requires(std::constructible_from<PointType, const OtherPointType&>)
109 label_ = detail::copyLabel<LabelType>(other);
115 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
116 requires(std::constructible_from<PointType, const OtherPointType&>)
120 label_ = detail::copyLabel<LabelType>(other);
143 static constexpr std::size_t
size() {
152 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
153 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
156 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
157 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
165 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t>(
size()); ++i) {
166 if ((*
this)[
static_cast<std::size_t
>(i)] == point) {
250 constexpr auto end()
const {
277 template<AnyShapeConcept OtherShape>
278 [[nodiscard]]
constexpr bool samePointSet(
const OtherShape& other)
const;
300 template <
class A = LabelType>
301 requires(detail::has_label_v<A>)
383 template <
class OtherNumber>
387 template <
class OtherNumber>
391 template <
class OtherNumber>
395 template <
class OtherNumber>
399 template <
class OtherNumber>
403 template <
class OtherNumber>
407 template <
class OtherNumber>
411 template <
class OtherNumber>
440 [[nodiscard]]
constexpr std::optional<PointType>
getIfPoint()
const;
478 template <
class ResultNumber = NumberType>
479 [[nodiscard]]
constexpr ResultNumber
area()
const;
503 template <
class ApproximateNumber =
double>
504 [[nodiscard]] ApproximateNumber
length()
const;
528 template<Po
intConcept OtherPo
int>
541 template<Po
intConcept OtherPo
int>
554 template<Po
intConcept OtherPo
int>
560 template<SegmentConcept OtherSegment>
562 return detail::reduceDegenerateToPoint(
566 template<OrientedSegmentConcept OtherOrientedSegment>
568 return detail::reduceDegenerateToPoint(
572 template<LineConcept OtherLine>
575 template<OrientedLineConcept OtherOrientedLine>
576 [[nodiscard]]
constexpr bool boundaryContains(
const OtherOrientedLine&)
const {
return false; }
578 template<RayConcept OtherRay>
581 template<HalfplaneConcept OtherHalfplane>
582 [[nodiscard]]
constexpr bool boundaryContains(
const OtherHalfplane&)
const {
return false; }
584 template<RectangleConcept OtherRectangle>
586 return detail::reduceDegenerateToPoint(
590 template<TriangleConcept OtherTriangle>
592 return detail::reduceDegenerateToPoint(
596 template<ConvexConcept OtherConvex>
598 return detail::reduceDegenerateToPoint(
602 template<PolygonConcept OtherPolygon>
604 return detail::reduceDegenerateToPoint(
608 template<DiskConcept OtherDisk>
610 return detail::reduceDegenerateToPoint(
624 template<Po
intConcept OtherPo
int>
637 template<Po
intConcept OtherPo
int>
638 [[nodiscard]]
constexpr bool contains(
const OtherPoint& point)
const;
648 template<SegmentConcept OtherSegment>
649 [[nodiscard]]
constexpr bool contains(
const OtherSegment& other)
const;
659 template<OrientedSegmentConcept OtherOrientedSegment>
660 [[nodiscard]]
constexpr bool contains(
const OtherOrientedSegment& other)
const;
663 template<LineConcept OtherLine>
664 [[nodiscard]]
constexpr bool contains(
const OtherLine& other)
const;
667 template<OrientedLineConcept OtherOrientedLine>
668 [[nodiscard]]
constexpr bool contains(
const OtherOrientedLine& other)
const;
671 template<RayConcept OtherRay>
672 [[nodiscard]]
constexpr bool contains(
const OtherRay& other)
const;
675 template<HalfplaneConcept OtherHalfplane>
676 [[nodiscard]]
constexpr bool contains(
const OtherHalfplane& other)
const;
679 template<RectangleConcept OtherRectangle>
680 [[nodiscard]]
constexpr bool contains(
const OtherRectangle& other)
const;
683 template<TriangleConcept OtherTriangle>
684 [[nodiscard]]
constexpr bool contains(
const OtherTriangle& other)
const;
687 template<ConvexConcept OtherConvex>
688 [[nodiscard]]
constexpr bool contains(
const OtherConvex& other)
const;
691 template<PolygonConcept OtherPolygon>
692 [[nodiscard]]
constexpr bool contains(
const OtherPolygon& other)
const;
695 template<DiskConcept OtherDisk>
696 [[nodiscard]]
constexpr bool contains(
const OtherDisk& other)
const;
709 template <
class EmptyPo
int>
714 template <
class EmptyPo
int>
719 template <
class EmptyPo
int>
724 template <
class EmptyPo
int>
730 template<Po
intConcept OtherPo
int>
734 template<SegmentConcept OtherSegment>
738 template<OrientedSegmentConcept OtherOrientedSegment>
742 template<LineConcept OtherLine>
746 template<OrientedLineConcept OtherOrientedLine>
750 template<RayConcept OtherRay>
754 template<HalfplaneConcept OtherHalfplane>
758 template<RectangleConcept OtherRectangle>
762 template<TriangleConcept OtherTriangle>
766 template<Po
intConcept OtherPo
int>
767 [[nodiscard]]
constexpr bool collinear(
const OtherPoint& point)
const;
770 template<SegmentConcept OtherSegment>
771 [[nodiscard]]
constexpr bool collinear(
const OtherSegment& other)
const;
774 template<OrientedSegmentConcept OtherOrientedSegment>
775 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedSegment& other)
const;
778 template<LineConcept OtherLine>
779 [[nodiscard]]
constexpr bool collinear(
const OtherLine& other)
const;
782 template<OrientedLineConcept OtherOrientedLine>
783 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedLine& other)
const;
786 template<RayConcept OtherRay>
787 [[nodiscard]]
constexpr bool collinear(
const OtherRay& other)
const;
800 template<Po
intConcept OtherPo
int>
801 [[nodiscard]]
constexpr std::partial_ordering
orientation(
const OtherPoint& point)
const;
811 template <
class ResultNumber = division_result_t<NumberType>>
812 [[nodiscard]]
constexpr ResultNumber
slope()
const;
829 template<SegmentConcept OtherSegment>
830 [[nodiscard]]
constexpr bool parallel(
const OtherSegment& other)
const;
833 template<OrientedSegmentConcept OtherOrientedSegment>
834 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedSegment& other)
const;
837 template<LineConcept OtherLine>
838 [[nodiscard]]
constexpr bool parallel(
const OtherLine& other)
const;
841 template<OrientedLineConcept OtherOrientedLine>
842 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedLine& other)
const;
845 template<RayConcept OtherRay>
846 [[nodiscard]]
constexpr bool parallel(
const OtherRay& other)
const;
849 template<Po
intConcept OtherPo
int>
850 [[nodiscard]]
constexpr bool intersects(
const OtherPoint& other)
const;
860 template<SegmentConcept OtherSegment>
861 [[nodiscard]]
constexpr bool intersects(
const OtherSegment& other)
const;
871 template<OrientedSegmentConcept OtherOrientedSegment>
872 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedSegment& other)
const;
878 template<
typename OtherShape>
880 [[nodiscard]]
constexpr bool intersects(
const OtherShape& other)
const {
881 return other.intersects(*
this);
885 template <
class EmptyPo
int>
899 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
900 [[nodiscard]]
constexpr std::optional<Point<ResultNumber, typename PointType::LabelType>>
904 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
905 [[nodiscard]]
constexpr auto intersection(
const OtherSegment& other)
const;
917 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
918 [[nodiscard]]
constexpr auto intersection(
const OtherOrientedSegment& other)
const;
921 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
923 && (detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
927 [[nodiscard]]
constexpr auto intersection(
const OtherShape& other)
const {
932 template <
class ResultNumber = NumberType,
class EmptyPo
int>
948 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
949 [[nodiscard]]
constexpr std::optional<ResultNumber>
963 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
964 [[nodiscard]]
constexpr std::optional<ResultNumber>
975 template<Po
intConcept OtherPo
int>
976 [[nodiscard]]
constexpr bool separates(
const OtherPoint& other)
const;
979 template<SegmentConcept OtherSegment>
980 [[nodiscard]]
constexpr bool separates(
const OtherSegment& other)
const;
990 template<OrientedSegmentConcept OtherOrientedSegment>
991 [[nodiscard]]
constexpr bool separates(
const OtherOrientedSegment& other)
const;
994 template<LineConcept OtherLine>
995 [[nodiscard]]
constexpr bool separates(
const OtherLine& other)
const;
998 template<OrientedLineConcept OtherOrientedLine>
999 [[nodiscard]]
constexpr bool separates(
const OtherOrientedLine& other)
const;
1002 template<RayConcept OtherRay>
1003 [[nodiscard]]
constexpr bool separates(
const OtherRay& other)
const;
1006 template<RectangleConcept OtherRectangle>
1007 [[nodiscard]]
constexpr bool separates(
const OtherRectangle& other)
const;
1010 template<TriangleConcept OtherTriangle>
1011 [[nodiscard]]
constexpr bool separates(
const OtherTriangle& other)
const;
1014 template<HalfplaneConcept OtherHalfplane>
1015 [[nodiscard]]
constexpr bool separates(
const OtherHalfplane& other)
const;
1018 template<ConvexConcept OtherConvex>
1019 [[nodiscard]]
constexpr bool separates(
const OtherConvex& other)
const;
1022 template<PolygonConcept OtherPolygon>
1023 [[nodiscard]]
constexpr bool separates(
const OtherPolygon& other)
const;
1026 template<MonotoneChainConcept OtherChain>
1027 [[nodiscard]]
constexpr bool contains(
const OtherChain& other)
const;
1030 template<MonotoneChainConcept OtherChain>
1032 return detail::reduceDegenerateToPoint(
1037 template<MonotoneChainConcept OtherChain>
1041 template<MonotoneChainConcept OtherChain>
1042 [[nodiscard]]
constexpr bool separates(
const OtherChain& other)
const;
1045 template<PolylineConcept OtherPolyline>
1046 [[nodiscard]]
constexpr bool contains(
const OtherPolyline& other)
const;
1049 template<PolylineConcept OtherPolyline>
1051 return detail::reduceDegenerateToPoint(
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>
1165 template<DiskConcept OtherDisk>
1166 [[nodiscard]]
constexpr bool separates(
const OtherDisk& other)
const;
1173 template<DiskConcept OtherDisk>
1177 template<ConvexConcept OtherConvex>
1181 template<PolygonConcept OtherPolygon>
1193 template<Po
intConcept OtherPo
int>
1197 template<SegmentConcept OtherSegment>
1208 template<OrientedSegmentConcept OtherOrientedSegment>
1212 template<
typename OtherShape>
1215 return other.interiorsIntersect(*
this);
1219 template <
class EmptyPo
int>
1235 template<SegmentConcept OtherSegment>
1236 [[nodiscard]]
constexpr bool crosses(
const OtherSegment& other)
const;
1246 template<OrientedSegmentConcept OtherOrientedSegment>
1247 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedSegment& other)
const;
1250 template<Po
intConcept OtherPo
int>
1251 [[nodiscard]]
constexpr bool crosses(
const OtherPoint& other)
const;
1254 template<
typename OtherShape>
1256 [[nodiscard]]
constexpr bool crosses(
const OtherShape& other)
const {
1257 return other.crosses(*
this);
1261 template <
class EmptyPo
int>
1284 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1302 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1320 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1329 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1330 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1345 template <
class ResultNumber =
double,
class DiskPo
intType,
class DiskLabel>
1362 template <
class ResultNumber = NumberType, BoundedPolygonalConcept OtherShape>
1363 requires detail::ClosestPairConcept<OrientedSegment<PointType_, TLabel>, OtherShape>
1382 template <
class ResultNumber = division_result_t<NumberType>,
class OtherShape>
1383 requires detail::ClosestPointsPairConcept<OrientedSegment<PointType_, TLabel>, OtherShape>
1387 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1388 [[nodiscard]]
constexpr auto distanceL1(
const OtherPoint& point)
const;
1391 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1392 [[nodiscard]]
constexpr auto distanceL1(
const OtherSegment& other)
const;
1395 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1396 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedSegment& other)
const;
1404 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1405 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1409 [[nodiscard]]
constexpr auto distanceL1(
const OtherShape& other)
const {
1428 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1441 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1447 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1451 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1452 [[nodiscard]]
constexpr auto distanceLInf(
const OtherSegment& other)
const;
1455 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1456 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedSegment& other)
const;
1464 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1465 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1481 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1487 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1491 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1495 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
1504 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1505 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1521 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1527 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1531 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1535 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
1544 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1545 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1561 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1581 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1599 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1610 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
1619 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1620 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1649 template <
class ResultNumber = gr
id_number_t<
typename Po
intType_::NumberType>>
1650 requires(detail::extended_integral<ResultNumber> || std::same_as<ResultNumber, BigInt>)
1667 template <std::
floating_po
int ResultNumber =
double>
1675 [[nodiscard]]
constexpr std::array<PointType, 2>
vertices()
const;
1691 [[nodiscard]]
constexpr std::array<Segment<PointType>, 1>
edges()
const;
1707 template <
class ResultNumber = division_result_t<NumberType>>
1719 template <
class ResultNumber = division_result_t<NumberType>>
1730 template <
class OtherShape>
1746 template <
class OtherShape>
1772 template <
class OtherShape>
1798 template <
class OtherShape>
1813 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1815 && (detail::shapeRank<OtherShape> > detail::shapeRank<OrientedSegment>)
1824 template<Po
intConcept OtherPo
int>
1828 template<Po
intConcept OtherPo
int>
1832 template <
class Scalar>
1837 template <
class Scalar>
1857template <
class Po
intType,
class LabelType,
class TranslationNumber,
class TranslationLabel>
1870template <
class Po
intType,
class LabelType,
class Scalar>
1871 requires(!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
1884template <
class Scalar,
class Po
intType,
class LabelType>
1885 requires(!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
1898template <
class Po
intType,
class LabelType,
class Scalar>
1899 requires(!detail::is_point_v<Scalar> && !TransformationConcept<Scalar>)
1911template <
class Po
intType,
class LabelType>
Bounded polygonal primitives, convex or not.
Definition forward.hpp:373
Shape pairs whose Minkowski sum Pangolin can represent.
Definition forward.hpp:476
Definition forward.hpp:306
Public declaration of pgl::Halfplane.
Definition arrangement.hpp:67
@ y
Definition intervaltree.hpp:24
@ x
Definition intervaltree.hpp:24
@ vertex
Definition bitmatrix.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
Segment() -> Segment< Point<>, NoLabel >
Ray() -> Ray< Point<>, NoLabel >
OrientedLine() -> OrientedLine< Point<>, NoLabel >
Public declaration of pgl::Segment.
Closed convex polygon stored by its vertices.
Definition convex.hpp:170
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
Directed segment preserving source-to-target order plus optional segment label.
Definition orientedsegment.hpp:44
ApproximateNumber length() const
Returns the Euclidean length.
Definition measures.hpp:125
constexpr bool intersects(const OtherSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:284
PointType::NumberType NumberType
Definition orientedsegment.hpp:46
constexpr bool intersects(const Shape< PointType > &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:296
constexpr bool boundaryContains(const OtherRectangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:585
constexpr const PointType & operator[](std::size_t index) const
Returns endpoint 0 for the source and 1 for the target.
Definition orientedsegment.hpp:130
bool separates(const OtherSet &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5921
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
constexpr void rotate90(int k=1)
Rotates the segment by 90k degrees around the origin in place.
Definition transformations.hpp:369
constexpr OrientedSegment(NumberType x1, NumberType y1, NumberType x2, NumberType y2)
Creates an oriented segment from four coordinates.
Definition orientedsegment.hpp:75
constexpr bool boundaryContains(const OtherSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:561
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:168
constexpr bool samePointSet(const OtherShape &other) const
Tests whether another shape defines exactly the same point set.
Definition samepointset.hpp:1953
constexpr std::array< OrientedSegment, 1 > orientedEdges() const
Returns the unique oriented edge of the oriented segment.
Definition bounding.hpp:132
constexpr std::ptrdiff_t index(const PointType &point) const
Definition orientedsegment.hpp:164
constexpr auto lengthL1() const
Returns the Manhattan length.
Definition measures.hpp:130
constexpr bool contains(const OtherOrientedLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:370
constexpr bool boundaryContains(const OtherPolygon &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:603
constexpr bool interiorsIntersect(const OtherPoint &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:295
constexpr PointType & source()
Definition orientedsegment.hpp:181
constexpr Halfplane< PointType > rightHalfplane() const
Returns the half-plane on the right of the segment direction.
Definition predicates.hpp:407
constexpr auto squaredHausdorffDistance(const OtherShape &other) const
Returns the squared Hausdorff distance to the given shape.
Definition orientedsegment.hpp:1624
constexpr bool separates(const OtherConvex &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:767
constexpr bool interiorContains(const OtherTriangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:294
std::array< PointType, 2 > points_
Definition orientedsegment.hpp:1842
constexpr auto distanceLInf(const OtherSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:241
constexpr auto hausdorffDistanceL1(const OtherPoint &point) const
Returns the Manhattan (L1) Hausdorff distance to the given shape.
Definition distancel1.hpp:988
constexpr const PointType & min() const
Returns the lexicographically smallest endpoint.
Definition orientedsegment.hpp:202
constexpr bool separates(const OtherSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:715
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:178
constexpr auto distanceL1(const OtherShape &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition orientedsegment.hpp:1409
constexpr bool verticesContain(const OtherPoint &point) const
Returns whether one endpoint equals the given point.
Definition predicates.hpp:315
constexpr auto hausdorffDistanceL1(const OtherSegment &other) const
Returns the Manhattan (L1) Hausdorff distance to the given shape.
Definition distancel1.hpp:975
constexpr bool containsEndpoint(const OtherPoint &point) const
Returns whether the given point is one endpoint.
Definition predicates.hpp:321
constexpr Rectangle< PointType > bbox() const
Returns the bounding box of the oriented segment.
Definition bounding.hpp:111
constexpr bool separates(const OtherDisk &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:773
constexpr PointType & get(std::ptrdiff_t index)
Definition orientedsegment.hpp:155
constexpr void scaleUpX(const OtherNumber scalar)
Multiplies the segment's x-coordinates by a factor in place.
Definition transformations.hpp:382
constexpr ResultNumber slope() const
Returns the slope of the segment.
Definition measures.hpp:141
constexpr bool interiorsIntersect(const OtherShape &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition orientedsegment.hpp:1214
constexpr const PointType & source() const
Definition orientedsegment.hpp:178
constexpr bool interiorsIntersect(const OtherSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:301
constexpr bool contains(const Shape< PointType > &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:416
constexpr Rectangle< Point< ResultNumber > > fbox() const
Returns a bounding box of the oriented segment with floating point coordinates.
Definition bounding.hpp:117
constexpr bool interiorContains(const OtherDisk &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1226
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:216
constexpr bool interiorContains(const OtherPolygon &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1232
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2057
constexpr OrientedLine< PointType > asOrientedLine() const
Returns the oriented supporting line.
Definition orientedsegment.hpp:338
auto minkowskiSum(const OtherShape &other) const
Returns the regularized Minkowski sum of the two shapes (A ⊕ B).
Definition orientedsegment.hpp:1819
constexpr bool interiorsIntersect(const EmptyShape< EmptyPoint > &) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition orientedsegment.hpp:1220
constexpr auto hausdorffDistanceLInf(const OtherOrientedSegment &other) const
Returns the Chebyshev (LInf) Hausdorff distance to the given shape.
Definition distancelinf.hpp:969
constexpr bool separates(const OtherChain &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3155
constexpr bool boundaryContains(const OtherConvex &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:597
constexpr auto operator<=>(const OrientedSegment &other) const
Provides lexicographic ordering on (source, target).
Definition orientedsegment.hpp:288
constexpr bool collinear(const OtherOrientedLine &other) const
Returns whether the given oriented line is collinear with the oriented segment.
Definition predicates.hpp:360
constexpr OrientedSegment rotated90(int k=1) const
Returns the segment rotated by 90k degrees around the origin.
Definition transformations.hpp:364
constexpr auto cbegin() const
Returns an iterator to the source endpoint.
Definition orientedsegment.hpp:241
constexpr auto lengthLInf() const
Returns the Chebyshev length.
Definition measures.hpp:135
constexpr bool contains(const OtherOrientedSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:358
constexpr auto distanceL1(const OtherPoint &point) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:247
constexpr Convex< PointType > convexHull() const
Returns the convex hull of the segment's endpoints.
Definition orientedsegment.hpp:1682
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:180
constexpr auto distanceLInf(const OtherOrientedSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:247
constexpr bool isUndefined() const
Returns whether the segment is degenerate without collapsing to a point or to a segment.
Definition predicates.hpp:299
constexpr bool boundaryContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:715
constexpr bool contains(const OtherChain &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2015
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1650
constexpr auto end()
Definition orientedsegment.hpp:253
constexpr auto squaredDistance(const OtherOrientedSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:190
constexpr bool interiorContains(const OtherOrientedSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:252
constexpr bool interiorContains(const OtherOrientedLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:264
static constexpr std::size_t size()
Returns the number of endpoints (always 2).
Definition orientedsegment.hpp:143
detail::floating_result_t< ResultNumber > squaredDistance(const Disk< DiskPointType, DiskLabel > &disk) const
Returns the squared Euclidean distance to a disk.
Definition orientedsegment.hpp:1346
constexpr auto squaredHausdorffDistance(const OtherSegment &other) const
Returns the squared Hausdorff distance to another unordered segment.
Definition distance.hpp:197
constexpr bool collinear(const OtherSegment &other) const
Returns whether the given segment is collinear with the oriented segment.
Definition predicates.hpp:342
constexpr bool separates(const OtherPolygon &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1997
constexpr bool crosses(const Shape< PointType > &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:195
constexpr auto minkowskiSum(const OtherShape &other) const
Returns the Minkowski sum of this shape and another (A ⊕ B).
Definition minkowski.hpp:795
constexpr bool boundaryContains(const OtherOrientedLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:576
constexpr bool isDegenerate() const
Returns whether both endpoints coincide.
Definition predicates.hpp:281
constexpr PointType & target()
Definition orientedsegment.hpp:193
constexpr const PointType & max() const
Returns the lexicographically largest endpoint.
Definition orientedsegment.hpp:211
constexpr std::partial_ordering orientation(const OtherPoint &point) const
Returns the orientation sign of a point with respect to the segment.
Definition predicates.hpp:372
constexpr OrientedSegment scaledDownY(const OtherNumber scalar) const
Returns the segment with its y-coordinates divided by a divisor.
constexpr bool contains(const OtherConvex &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:405
constexpr A & label() const
Definition orientedsegment.hpp:302
constexpr OrientedSegment & operator+=(const OtherPoint &translation)
Translates the oriented segment by the given point in place.
constexpr bool interiorContains(const OtherHalfplane &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:276
constexpr bool separates(const OtherRay &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:739
constexpr std::optional< PointType > getIfPoint() const
Returns the point the segment collapses to, if it does.
Definition predicates.hpp:291
constexpr Point< ResultNumber > pointInside() const
Returns a point inside the segment.
Definition measures.hpp:162
constexpr bool boundaryContains(const OtherChain &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:1031
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 orientedsegment.hpp:1442
constexpr EmptyShape< EmptyPoint > intersection(const EmptyShape< EmptyPoint > &) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition orientedsegment.hpp:933
constexpr OrientedSegment(PointType source, PointType target)
Creates an oriented segment from a source and target.
Definition orientedsegment.hpp:64
constexpr ResultNumber area() const
Returns the area of the segment.
Definition measures.hpp:109
constexpr auto begin() const
Returns an iterator to the source endpoint.
Definition orientedsegment.hpp:229
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
constexpr bool crosses(const OtherOrientedSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:184
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition orientedsegment.hpp:725
constexpr bool contains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition orientedsegment.hpp:710
constexpr bool isPoint() const
Returns whether the segment collapses to a single point.
Definition predicates.hpp:286
constexpr bool intersects(const OtherOrientedSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:290
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
constexpr bool boundaryContains(const OtherPolyline &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:1050
constexpr auto intersection(const OtherShape &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition orientedsegment.hpp:927
constexpr bool interiorContains(const OtherSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:246
constexpr const PointType & target() const
Definition orientedsegment.hpp:190
constexpr void scaleDownX(const OtherNumber scalar)
Divides the segment's x-coordinates by a divisor in place.
Definition transformations.hpp:408
constexpr auto end() const
Returns an iterator past the target endpoint.
Definition orientedsegment.hpp:250
constexpr auto squaredHausdorffDistance(const OtherOrientedSegment &other) const
Returns the squared Hausdorff distance to another oriented segment.
Definition distance.hpp:203
constexpr bool isVertical() const
Returns whether the segment is vertical.
Definition predicates.hpp:304
constexpr bool parallel(const OtherLine &other) const
Returns whether the given line is parallel to the oriented segment.
Definition predicates.hpp:390
constexpr auto distanceL1(const OtherSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:253
std::vector< Point< ResultNumber, typename PointType::LabelType > > latticePoints() const
Returns the integer points the oriented segment contains.
Definition lattice.hpp:508
constexpr bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:4585
constexpr bool collinear(const OtherRay &other) const
Returns whether the given ray is collinear with the oriented segment.
Definition predicates.hpp:366
constexpr auto hausdorffDistanceL1(const OtherOrientedSegment &other) const
Returns the Manhattan (L1) Hausdorff distance to the given shape.
Definition distancel1.hpp:981
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 orientedsegment.hpp:151
constexpr bool parallel(const OtherOrientedLine &other) const
Returns whether the given oriented line is parallel to the oriented segment.
Definition predicates.hpp:396
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 orientedsegment.hpp:1429
constexpr auto distanceLInf(const OtherShape &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition orientedsegment.hpp:1469
constexpr bool boundaryContains(const OtherRay &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:579
constexpr Segment< PointType > asSegment() const
Returns the segment without orientation.
Definition orientedsegment.hpp:322
constexpr bool boundaryContains(const OtherDisk &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:609
constexpr Halfplane< PointType > leftHalfplane() const
Returns the half-plane on the left of the segment direction.
Definition predicates.hpp:412
TLabel LabelType
Definition orientedsegment.hpp:47
constexpr bool operator==(const OrientedSegment &other) const
Compares two oriented segments by their endpoints; the label is ignored.
Definition orientedsegment.hpp:272
constexpr NumberType twiceArea() const
Returns twice the area of the segment.
Definition measures.hpp:114
constexpr bool contains(const OtherHalfplane &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:382
constexpr bool separates(const OtherOrientedSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:721
constexpr std::array< Segment< PointType >, 1 > edges() const
Returns the unique geometric edge of the oriented segment.
Definition bounding.hpp:127
constexpr OrientedSegment & operator-=(const OtherPoint &translation)
Translates the oriented segment by the negation of the given point in place.
constexpr bool separates(const OtherRectangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:745
constexpr std::optional< ResultNumber > yAtX(const OtherNumber &x) const
Returns the value of the y coordinate for a given x, if it exists.
Definition atxy.hpp:95
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:190
constexpr auto distanceLInf(const OtherPoint &point) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:235
constexpr auto cend() const
Returns an iterator past the target endpoint.
Definition orientedsegment.hpp:262
PointType PointType
Definition orientedsegment.hpp:45
constexpr auto squaredLength() const
Returns the squared Euclidean length.
Definition measures.hpp:119
constexpr bool crosses(const EmptyShape< EmptyPoint > &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition orientedsegment.hpp:1262
constexpr bool contains(const OtherDisk &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:411
constexpr bool interiorContains(const OtherSet &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition orientedsegment.hpp:1144
constexpr bool separates(const OtherTriangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:755
constexpr PointType & operator[](std::size_t index)
Returns endpoint 0 for the source and 1 for the target.
Definition orientedsegment.hpp:135
constexpr bool interiorContains(const OtherLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:258
constexpr bool contains(const OtherRectangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:388
constexpr bool boundaryContains(const OtherOrientedSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:567
constexpr Point< ResultNumber > midpoint() const
Returns the midpoint of the segment.
Definition measures.hpp:154
constexpr bool collinear(const OtherOrientedSegment &other) const
Returns whether another oriented segment is collinear with this oriented segment.
Definition predicates.hpp:348
constexpr bool crosses(const OtherShape &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition orientedsegment.hpp:1256
constexpr auto closestSegments(const OtherShape &other) const
Returns the pair of elements realizing the distance, nothing when the shapes meet.
Definition closest.hpp:328
constexpr bool collinear(const OtherLine &other) const
Returns whether the given line is collinear with the oriented segment.
Definition predicates.hpp:354
LabelType label_
Definition orientedsegment.hpp:1843
constexpr bool interiorContains(const OtherRectangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:282
constexpr std::array< PointType, 2 > vertices() const
Returns the two endpoints in source-to-target order.
Definition bounding.hpp:122
constexpr bool boundaryContains(const Shape< PointType > &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1089
constexpr auto closestPoints(const OtherShape &other) const
Returns the pair of points realizing the distance, nothing when the shapes meet.
Definition closest.hpp:335
constexpr bool boundaryContains(const OtherSet &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:1133
constexpr bool contains(const OtherRay &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:376
constexpr auto intersection(const OtherSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:186
constexpr bool parallel(const OtherRay &other) const
Returns whether the given ray is parallel to the oriented segment.
Definition predicates.hpp:402
constexpr OrientedSegment()=default
Creates the degenerate oriented segment (0,0)->(0,0).
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:278
constexpr auto squaredDistance(const OtherShape &other) const
Returns the squared Euclidean distance to the given shape.
Definition orientedsegment.hpp:1334
constexpr void scaleUpY(const OtherNumber scalar)
Multiplies the segment's y-coordinates by a factor in place.
Definition transformations.hpp:395
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:709
constexpr bool boundaryContains(const OtherHalfplane &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:582
constexpr bool separates(const OtherHalfplane &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:761
constexpr OrientedSegment scaledUpX(const OtherNumber scalar) const
Returns the segment with its x-coordinates multiplied by a factor.
constexpr bool containsCollinear(const OtherPoint &point) const
Returns whether the segment contains the given point that is collinear with the segment.
Definition predicates.hpp:327
constexpr OrientedSegment(const OrientedSegment< OtherPointType, OtherLabelType > &other)
Converts an oriented segment with a different point and/or label type.
Definition orientedsegment.hpp:107
constexpr Ray< PointType > asRay() const
Returns the ray with the same source and direction.
Definition orientedsegment.hpp:363
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:346
constexpr auto minkowskiErosion(const OtherShape &other) const
Returns the Minkowski erosion of this shape by another (A ⊖ B).
Definition minkowskierosion.hpp:628
constexpr auto minkowskiErosion(const OtherShape &other) const
Returns the Minkowski erosion of this shape by a bounded polygonal one (A ⊖ B).
constexpr OrientedSegment opposite() const
Returns the opposite orientation of the same geometric segment.
Definition orientedsegment.hpp:220
constexpr OrientedSegment(NumberType x1, NumberType y1, NumberType x2, NumberType y2, A &&label)
Same as the four-coordinate constructor, and stores a label.
Definition orientedsegment.hpp:96
constexpr auto hausdorffDistanceLInf(const OtherShape &other) const
Returns the Chebyshev (LInf) Hausdorff distance to the given shape.
Definition orientedsegment.hpp:1549
constexpr bool contains(const OtherPolygon &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1717
constexpr bool interiorContains(const OtherConvex &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:300
constexpr auto squaredDistance(const OtherPoint &point) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:178
constexpr bool parallel(const OtherOrientedSegment &other) const
Returns whether another oriented segment is parallel to this oriented segment.
Definition predicates.hpp:384
constexpr bool isHorizontal() const
Returns whether the segment is horizontal.
Definition predicates.hpp:309
constexpr OrientedSegment scaledDownX(const OtherNumber scalar) const
Returns the segment with its x-coordinates divided by a divisor.
constexpr auto hausdorffDistanceL1(const Shape< OtherPoint > &other) const
Returns the distance to the given shape, using symmetry to re-dispatch through the wrapper's own haus...
Definition orientedsegment.hpp:1522
constexpr auto distanceL1(const OtherOrientedSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:259
constexpr bool contains(const OtherTriangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:399
constexpr bool intersects(const OtherShape &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition orientedsegment.hpp:880
constexpr auto hausdorffDistanceLInf(const OtherPoint &point) const
Returns the Chebyshev (LInf) Hausdorff distance to the given shape.
Definition distancelinf.hpp:976
bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5659
constexpr void scaleDownY(const OtherNumber scalar)
Divides the segment's y-coordinates by a divisor in place.
Definition transformations.hpp:421
constexpr bool contains(const OtherSet &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition orientedsegment.hpp:1122
constexpr auto squaredHausdorffDistance(const OtherPoint &point) const
Returns the squared Hausdorff distance to a point.
Definition distance.hpp:210
constexpr OrientedSegment scaledUpY(const OtherNumber scalar) const
Returns the segment with its y-coordinates multiplied by a factor.
constexpr auto hausdorffDistanceL1(const OtherShape &other) const
Returns the Manhattan (L1) Hausdorff distance to the given shape.
Definition orientedsegment.hpp:1509
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition orientedsegment.hpp:720
constexpr Segment< PointType > diameter() const
Returns an unordered segment defining the diameter.
Definition measures.hpp:148
constexpr bool separates(const OtherOrientedLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:733
constexpr bool boundaryContains(const OtherTriangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:591
constexpr std::optional< ResultNumber > xAtY(const OtherNumber &y) const
Returns the value of the x coordinate for a given y, if it exists.
Definition atxy.hpp:108
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2752
constexpr bool separates(const OtherLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:727
constexpr bool interiorContains(const OtherPolyline &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1693
constexpr bool intersects(const EmptyShape< EmptyPoint > &) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition orientedsegment.hpp:886
constexpr bool boundaryContains(const OtherLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition orientedsegment.hpp:573
constexpr bool contains(const OtherSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:352
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 orientedsegment.hpp:1482
constexpr bool interiorsIntersect(const Shape< PointType > &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:312
constexpr bool collinear(const OtherPoint &point) const
Returns whether the given point is collinear with the oriented segment.
Definition predicates.hpp:333
constexpr bool contains(const OtherPolyline &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2373
constexpr auto begin()
Definition orientedsegment.hpp:232
constexpr OrientedSegment(PointType source, PointType target, A &&label)
Creates an oriented segment from a source and target and stores a label.
Definition orientedsegment.hpp:90
constexpr bool interiorContains(const OtherChain &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1470
constexpr bool separates(const OtherPolyline &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3960
constexpr auto squaredDistance(const OtherSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:184
constexpr auto hausdorffDistanceLInf(const Shape< OtherPoint > &other) const
Returns the distance to the given shape, using symmetry to re-dispatch through the wrapper's own haus...
Definition orientedsegment.hpp:1562
constexpr bool interiorContains(const OtherRay &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:270
constexpr auto hausdorffDistanceLInf(const OtherSegment &other) const
Returns the Chebyshev (LInf) Hausdorff distance to the given shape.
Definition distancelinf.hpp:963
constexpr Line< PointType > asLine() const
Returns the supporting line without orientation.
Definition orientedsegment.hpp:347
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:240
constexpr bool interiorsIntersect(const OtherOrientedSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:307
constexpr bool separates(const Shape< PointType > &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:778
constexpr bool parallel(const OtherSegment &other) const
Returns whether the given segment is parallel to the oriented segment.
Definition predicates.hpp:378
constexpr bool contains(const OtherLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:364
constexpr auto intersection(const OtherOrientedSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:192
Two-dimensional point with optional label payload.
Definition point.hpp:129
Half-infinite line starting from one source point plus optional ray label.
Definition ray.hpp:51
Axis-aligned rectangle stored by minimum and maximum corners.
Definition rectangle.hpp:75
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