28template <
class Po
intType = Po
int<>,
class Label>
33template <
class Po
intType>
36template <
class Po
intType,
class A>
39template <
class Number>
50template <
class Po
intType_,
class TLabel>
57 static_assert(detail::is_point_v<PointType>,
"Ray requires pgl::Point defining points");
62 constexpr Ray() =
default;
94 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
96 : points_{std::move(
source), std::move(
target)}, label_(std::forward<A>(
label)) {}
100 requires(detail::has_label_v<LabelType> && std::constructible_from<LabelType, A&&>)
110 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
111 requires(std::constructible_from<PointType, const OtherPointType&>)
114 label_ = detail::copyLabel<LabelType>(other);
118 template<Po
intConcept OtherPo
intType,
class OtherLabelType>
119 requires(std::constructible_from<PointType, const OtherPointType&>)
123 label_ = detail::copyLabel<LabelType>(other);
135 return points_[
index];
140 return points_[
index];
146 static constexpr std::size_t
size() {
155 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
156 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
159 const std::ptrdiff_t n =
static_cast<std::ptrdiff_t
>(
size());
160 return (*
this)[
static_cast<std::size_t
>(((
index % n) + n) % n)];
168 for (std::ptrdiff_t i = 0; i < static_cast<std::ptrdiff_t>(
size()); ++i) {
169 if ((*
this)[
static_cast<std::size_t
>(i)] == point) {
233 return points_.cbegin();
236 return points_.begin();
245 return points_.cbegin();
253 constexpr auto end()
const {
254 return points_.cend();
257 return points_.end();
266 return points_.cend();
281 template<AnyShapeConcept OtherShape>
282 [[nodiscard]]
constexpr bool samePointSet(
const OtherShape& other)
const;
301 template <
class A = LabelType>
302 requires(detail::has_label_v<A>)
355 template <
class OtherNumber>
359 template <
class OtherNumber>
363 template <
class OtherNumber>
367 template <
class OtherNumber>
371 template <
class OtherNumber>
375 template <
class OtherNumber>
379 template <
class OtherNumber>
383 template <
class OtherNumber>
394 template <
class ResultNumber = NumberType>
395 [[nodiscard]]
constexpr ResultNumber
area()
const;
441 template<Po
intConcept OtherPo
int>
445 template<Po
intConcept OtherPo
int>
451 template<SegmentConcept OtherSegment>
453 return detail::reduceDegenerateToPoint(
457 template<OrientedSegmentConcept OtherOrientedSegment>
459 return detail::reduceDegenerateToPoint(
463 template<LineConcept OtherLine>
466 template<OrientedLineConcept OtherOrientedLine>
467 [[nodiscard]]
constexpr bool boundaryContains(
const OtherOrientedLine&)
const {
return false; }
469 template<RayConcept OtherRay>
472 template<HalfplaneConcept OtherHalfplane>
473 [[nodiscard]]
constexpr bool boundaryContains(
const OtherHalfplane&)
const {
return false; }
475 template<RectangleConcept OtherRectangle>
477 return detail::reduceDegenerateToPoint(
481 template<TriangleConcept OtherTriangle>
483 return detail::reduceDegenerateToPoint(
487 template<ConvexConcept OtherConvex>
489 return detail::reduceDegenerateToPoint(
493 template<PolygonConcept OtherPolygon>
495 return detail::reduceDegenerateToPoint(
499 template<DiskConcept OtherDisk>
501 return detail::reduceDegenerateToPoint(
516 template<Po
intConcept OtherPo
int>
520 template<Po
intConcept OtherPo
int>
521 [[nodiscard]]
constexpr bool contains(
const OtherPoint& point)
const;
524 template<LineConcept OtherLine>
525 [[nodiscard]]
constexpr bool contains(
const OtherLine& other)
const;
528 template<OrientedLineConcept OtherOrientedLine>
529 [[nodiscard]]
constexpr bool contains(
const OtherOrientedLine& other)
const;
532 template<SegmentConcept OtherSegment>
533 [[nodiscard]]
constexpr bool contains(
const OtherSegment& other)
const;
536 template<OrientedSegmentConcept OtherOrientedSegment>
537 [[nodiscard]]
constexpr bool contains(
const OtherOrientedSegment& other)
const;
540 template<RayConcept OtherRay>
541 [[nodiscard]]
constexpr bool contains(
const OtherRay& other)
const;
544 template<HalfplaneConcept OtherHalfplane>
545 [[nodiscard]]
constexpr bool contains(
const OtherHalfplane& other)
const;
548 template<RectangleConcept OtherRectangle>
549 [[nodiscard]]
constexpr bool contains(
const OtherRectangle& other)
const;
552 template<TriangleConcept OtherTriangle>
553 [[nodiscard]]
constexpr bool contains(
const OtherTriangle& other)
const;
556 template<ConvexConcept OtherConvex>
557 [[nodiscard]]
constexpr bool contains(
const OtherConvex& other)
const;
560 template<PolygonConcept OtherPolygon>
561 [[nodiscard]]
constexpr bool contains(
const OtherPolygon& other)
const;
564 template<DiskConcept OtherDisk>
565 [[nodiscard]]
constexpr bool contains(
const OtherDisk& other)
const;
578 template <
class EmptyPo
int>
583 template <
class EmptyPo
int>
588 template <
class EmptyPo
int>
593 template <
class EmptyPo
int>
599 template<Po
intConcept OtherPo
int>
603 template<LineConcept OtherLine>
607 template<OrientedLineConcept OtherOrientedLine>
611 template<SegmentConcept OtherSegment>
615 template<OrientedSegmentConcept OtherOrientedSegment>
619 template<RayConcept OtherRay>
623 template<HalfplaneConcept OtherHalfplane>
627 template<RectangleConcept OtherRectangle>
631 template<TriangleConcept OtherTriangle>
635 template<Po
intConcept OtherPo
int>
636 [[nodiscard]]
constexpr bool collinear(
const OtherPoint& point)
const;
639 template<LineConcept OtherLine>
640 [[nodiscard]]
constexpr bool collinear(
const OtherLine& other)
const;
643 template<OrientedLineConcept OtherOrientedLine>
644 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedLine& other)
const;
647 template<SegmentConcept OtherSegment>
648 [[nodiscard]]
constexpr bool collinear(
const OtherSegment& other)
const;
651 template<OrientedSegmentConcept OtherOrientedSegment>
652 [[nodiscard]]
constexpr bool collinear(
const OtherOrientedSegment& other)
const;
655 template<RayConcept OtherRay>
656 [[nodiscard]]
constexpr bool collinear(
const OtherRay& other)
const;
669 template<Po
intConcept OtherPo
int>
670 [[nodiscard]]
constexpr std::partial_ordering
orientation(
const OtherPoint& point)
const;
680 template <
class ResultNumber = division_result_t<NumberType>>
681 [[nodiscard]]
constexpr ResultNumber
slope()
const;
718 template<LineConcept OtherLine>
719 [[nodiscard]]
constexpr bool parallel(
const OtherLine& other)
const;
722 template<OrientedLineConcept OtherOrientedLine>
723 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedLine& other)
const;
726 template<SegmentConcept OtherSegment>
727 [[nodiscard]]
constexpr bool parallel(
const OtherSegment& other)
const;
730 template<OrientedSegmentConcept OtherOrientedSegment>
731 [[nodiscard]]
constexpr bool parallel(
const OtherOrientedSegment& other)
const;
734 template<RayConcept OtherRay>
735 [[nodiscard]]
constexpr bool parallel(
const OtherRay& other)
const;
738 template<Po
intConcept OtherPo
int>
739 [[nodiscard]]
constexpr bool intersects(
const OtherPoint& other)
const;
742 template<LineConcept OtherLine>
743 [[nodiscard]]
constexpr bool intersects(
const OtherLine& other)
const;
746 template<OrientedLineConcept OtherOrientedLine>
747 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedLine& other)
const;
750 template<SegmentConcept OtherSegment>
751 [[nodiscard]]
constexpr bool intersects(
const OtherSegment& other)
const;
754 template<OrientedSegmentConcept OtherOrientedSegment>
755 [[nodiscard]]
constexpr bool intersects(
const OtherOrientedSegment& other)
const;
758 template<RayConcept OtherRay>
759 [[nodiscard]]
constexpr bool intersects(
const OtherRay& other)
const;
765 template<
typename OtherShape>
767 [[nodiscard]]
constexpr bool intersects(
const OtherShape& other)
const {
768 return other.intersects(*
this);
772 template <
class EmptyPo
int>
778 template<Po
intConcept OtherPo
int>
782 template<LineConcept OtherLine>
786 template<OrientedLineConcept OtherOrientedLine>
790 template<SegmentConcept OtherSegment>
794 template<OrientedSegmentConcept OtherOrientedSegment>
798 template<RayConcept OtherRay>
802 template<
typename OtherShape>
805 return other.interiorsIntersect(*
this);
809 template <
class EmptyPo
int>
818 template<LineConcept OtherLine>
819 [[nodiscard]]
constexpr bool crosses(
const OtherLine& other)
const;
822 template<OrientedLineConcept OtherOrientedLine>
823 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedLine& other)
const;
826 template<SegmentConcept OtherSegment>
827 [[nodiscard]]
constexpr bool crosses(
const OtherSegment& other)
const;
830 template<OrientedSegmentConcept OtherOrientedSegment>
831 [[nodiscard]]
constexpr bool crosses(
const OtherOrientedSegment& other)
const;
834 template<RayConcept OtherRay>
835 [[nodiscard]]
constexpr bool crosses(
const OtherRay& other)
const;
838 template<Po
intConcept OtherPo
int>
839 [[nodiscard]]
constexpr bool crosses(
const OtherPoint& other)
const;
842 template<
typename OtherShape>
844 [[nodiscard]]
constexpr bool crosses(
const OtherShape& other)
const {
845 return other.crosses(*
this);
849 template <
class EmptyPo
int>
858 template<Po
intConcept OtherPo
int>
859 [[nodiscard]]
constexpr bool separates(
const OtherPoint& other)
const;
862 template<SegmentConcept OtherSegment>
863 [[nodiscard]]
constexpr bool separates(
const OtherSegment& other)
const;
866 template<OrientedSegmentConcept OtherOrientedSegment>
867 [[nodiscard]]
constexpr bool separates(
const OtherOrientedSegment& other)
const;
870 template<LineConcept OtherLine>
871 [[nodiscard]]
constexpr bool separates(
const OtherLine& other)
const;
874 template<OrientedLineConcept OtherOrientedLine>
875 [[nodiscard]]
constexpr bool separates(
const OtherOrientedLine& other)
const;
878 template<RayConcept OtherRay>
879 [[nodiscard]]
constexpr bool separates(
const OtherRay& other)
const;
882 template<HalfplaneConcept OtherHalfplane>
883 [[nodiscard]]
constexpr bool separates(
const OtherHalfplane& other)
const;
886 template<RectangleConcept OtherRectangle>
887 [[nodiscard]]
constexpr bool separates(
const OtherRectangle& other)
const;
890 template<TriangleConcept OtherTriangle>
891 [[nodiscard]]
constexpr bool separates(
const OtherTriangle& other)
const;
894 template<ConvexConcept OtherConvex>
895 [[nodiscard]]
constexpr bool separates(
const OtherConvex& other)
const;
906 template<PolygonConcept OtherPolygon>
907 [[nodiscard]]
constexpr bool separates(
const OtherPolygon& other)
const;
910 template<MonotoneChainConcept OtherChain>
911 [[nodiscard]]
constexpr bool contains(
const OtherChain& other)
const;
914 template<MonotoneChainConcept OtherChain>
916 return detail::reduceDegenerateToPoint(
921 template<MonotoneChainConcept OtherChain>
925 template<MonotoneChainConcept OtherChain>
926 [[nodiscard]]
constexpr bool separates(
const OtherChain& other)
const;
929 template<PolylineConcept OtherPolyline>
930 [[nodiscard]]
constexpr bool contains(
const OtherPolyline& other)
const;
933 template<PolylineConcept OtherPolyline>
935 return detail::reduceDegenerateToPoint(
940 template<PolylineConcept OtherPolyline>
944 template<PolylineConcept OtherPolyline>
945 [[nodiscard]]
constexpr bool separates(
const OtherPolyline& other)
const;
948 template<HalfplaneIntersectionConcept OtherRegion>
949 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
952 template<HalfplaneIntersectionConcept OtherRegion>
956 template<HalfplaneIntersectionConcept OtherRegion>
960 template<HalfplaneIntersectionConcept OtherRegion>
961 [[nodiscard]]
constexpr bool separates(
const OtherRegion& other)
const;
970 template<PolygonWithHolesConcept OtherRegion>
971 [[nodiscard]]
constexpr bool contains(
const OtherRegion& other)
const;
979 template<PolygonWithHolesConcept OtherRegion>
983 template<PolygonWithHolesConcept OtherRegion>
993 template<PolygonWithHolesConcept OtherRegion>
994 [[nodiscard]]
bool separates(
const OtherRegion& other)
const;
1005 template<PolygonSetConcept OtherSet>
1006 [[nodiscard]]
constexpr bool contains(
const OtherSet& other)
const {
1007 for (
const auto& component : other) {
1016 template<PolygonSetConcept OtherSet>
1018 for (
const auto& component : other) {
1027 template<PolygonSetConcept OtherSet>
1029 for (
const auto& component : other) {
1045 template<PolygonSetConcept OtherSet>
1049 template<DiskConcept OtherDisk>
1050 [[nodiscard]]
constexpr bool separates(
const OtherDisk& other)
const;
1057 template<DiskConcept OtherDisk>
1061 template<ConvexConcept OtherConvex>
1065 template<PolygonConcept OtherPolygon>
1070 template <
class ResultNumber = NumberType, Po
intConcept OtherPo
int>
1071 [[nodiscard]]
constexpr std::optional<Point<ResultNumber, typename PointType::LabelType>>
1075 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1080 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1085 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1090 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1095 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1100 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1102 && (detail::shapeRank<OtherShape> > detail::shapeRank<Ray>)
1103 &&
requires(
const OtherShape& o,
const Ray& self) {
1111 template <
class ResultNumber = NumberType,
class EmptyPo
int>
1128 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
1129 [[nodiscard]]
constexpr std::optional<ResultNumber>
1144 template <
class ResultNumber = division_result_t<NumberType>,
class OtherNumber>
1145 [[nodiscard]]
constexpr std::optional<ResultNumber>
1159 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1163 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1167 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1171 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1175 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1179 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1188 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1189 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Ray>)
1190 &&
requires(
const OtherShape& o,
const Ray& self) {
1204 template <
class ResultNumber =
double,
class DiskPo
intType,
class DiskLabel>
1224 template <
class ResultNumber = division_result_t<NumberType>,
class OtherShape>
1225 requires detail::ClosestPointsPairConcept<Ray<PointType_, TLabel>, OtherShape>
1229 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1230 [[nodiscard]]
constexpr auto distanceL1(
const OtherPoint& point)
const;
1233 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1234 [[nodiscard]]
constexpr auto distanceL1(
const OtherLine& other)
const;
1237 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1238 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedLine& other)
const;
1241 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1242 [[nodiscard]]
constexpr auto distanceL1(
const OtherSegment& other)
const;
1245 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1246 [[nodiscard]]
constexpr auto distanceL1(
const OtherOrientedSegment& other)
const;
1249 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1250 [[nodiscard]]
constexpr auto distanceL1(
const OtherRay& other)
const;
1258 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1259 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Ray>)
1260 &&
requires(
const OtherShape& o,
const Ray& self) {
1263 [[nodiscard]]
constexpr auto distanceL1(
const OtherShape& other)
const {
1282 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1295 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1301 template <
class ResultNumber = division_result_t<NumberType>, Po
intConcept OtherPo
int>
1305 template <
class ResultNumber = division_result_t<NumberType>, LineConcept OtherLine>
1309 template <
class ResultNumber = division_result_t<NumberType>, OrientedLineConcept OtherOrientedLine>
1310 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedLine& other)
const;
1313 template <
class ResultNumber = division_result_t<NumberType>, SegmentConcept OtherSegment>
1314 [[nodiscard]]
constexpr auto distanceLInf(
const OtherSegment& other)
const;
1317 template <
class ResultNumber = division_result_t<NumberType>, OrientedSegmentConcept OtherOrientedSegment>
1318 [[nodiscard]]
constexpr auto distanceLInf(
const OtherOrientedSegment& other)
const;
1321 template <
class ResultNumber = division_result_t<NumberType>, RayConcept OtherRay>
1330 template <
class ResultNumber = division_result_t<NumberType>,
typename OtherShape>
1331 requires ((detail::shapeRank<OtherShape> > detail::shapeRank<Ray>)
1332 &&
requires(
const OtherShape& o,
const Ray& self) {
1347 template <
class ResultNumber =
double, Po
intConcept OtherPo
int>
1368 template <
class OtherShape>
1395 template <
class OtherShape>
1400 template<Po
intConcept OtherPo
int>
1404 template<Po
intConcept OtherPo
int>
1408 template <
class Scalar>
1410 constexpr Ray&
operator*=(
const Scalar& scalar);
1413 template <
class Scalar>
1415 constexpr Ray&
operator/=(
const Scalar& scalar);
1424 template <
class ResultNumber = NumberType>
1434 template <
class OtherShape>
1438 template <
class OtherNumber>
1439 using promoted_number_t = std::common_type_t<CoordinateType, detail::promoted_number_t<OtherNumber>>;
1441 std::array<PointType, 2> points_{};
1442 [[no_unique_address]]
mutable LabelType label_{};
1445template <
class Po
intType,
class LabelType,
class TranslationNumber,
class TranslationLabel>
1448template <
class Po
intType,
class LabelType,
class Scalar>
1452template <
class Scalar,
class Po
intType,
class LabelType>
1456template <
class Po
intType,
class LabelType,
class Scalar>
1460template <
class Po
intType,
class LabelType>
Shape pairs whose Minkowski sum Pangolin can represent.
Definition forward.hpp:476
Definition forward.hpp:306
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
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
Ray() -> Ray< Point<>, NoLabel >
OrientedLine() -> OrientedLine< Point<>, NoLabel >
Public declaration of pgl::OrientedLine.
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
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
constexpr Halfplane< PointType > halfplaneAbove() const
Returns the half-plane geometrically above the supporting line.
Definition predicates.hpp:843
constexpr Halfplane< PointType > leftHalfplane() const
Returns the half-plane on the left of the ray direction.
Definition predicates.hpp:858
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 ray.hpp:1296
constexpr bool interiorContains(const OtherLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:473
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:345
constexpr bool isVertical() const
Returns whether the ray is vertical.
Definition predicates.hpp:737
constexpr auto cend() const
Returns an iterator past the target point.
Definition ray.hpp:265
constexpr Halfplane< PointType > rightHalfplane() const
Returns the half-plane on the right of the ray direction.
Definition predicates.hpp:853
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition ray.hpp:589
constexpr bool interiorsIntersect(const OtherShape &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition ray.hpp:804
constexpr std::partial_ordering orientation(const OtherPoint &point) const
Returns the orientation sign of a point with respect to the ray.
Definition predicates.hpp:802
constexpr bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:4612
constexpr bool contains(const OtherSet &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition ray.hpp:1006
constexpr bool separates(const OtherConvex &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1114
constexpr bool contains(const OtherDisk &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:704
constexpr bool collinear(const OtherOrientedLine &other) const
Returns whether the given oriented line is collinear with the ray.
Definition predicates.hpp:778
constexpr bool separates(const OtherSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:993
constexpr Ray scaledDownY(const OtherNumber scalar) const
Returns the ray with its y-coordinates divided by a divisor.
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:267
constexpr Ray(const Ray< OtherPointType, OtherLabelType > &other)
Converts a ray with a different point and/or label type.
Definition ray.hpp:112
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:363
constexpr Ray(NumberType x1, NumberType y1, NumberType x2, NumberType y2)
Creates a ray from four coordinates.
Definition ray.hpp:83
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 ray.hpp:154
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
constexpr bool intersects(const Shape< PointType > &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:486
constexpr bool boundaryContains(const OtherRay &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:470
constexpr auto minkowskiErosion(const OtherShape &other) const
Returns the Minkowski erosion of this shape by another (A ⊖ B).
Definition minkowskierosion.hpp:631
constexpr bool contains(const OtherRay &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:658
constexpr bool collinear(const OtherPoint &point) const
Returns whether the given point is collinear with the ray.
Definition predicates.hpp:766
constexpr bool operator==(const Ray &other) const
Tests equality of the represented ray.
Definition predicates.hpp:713
constexpr bool interiorContains(const OtherConvex &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:529
constexpr void scaleDownX(const OtherNumber scalar)
Divides the ray's x-coordinates by a divisor in place.
Definition transformations.hpp:1047
constexpr Ray & operator-=(const OtherPoint &translation)
Translates the ray by the negation of the given point in place.
constexpr bool parallel(const OtherLine &other) const
Returns whether the given line is parallel to the ray.
Definition predicates.hpp:808
constexpr bool interiorContains(const OtherHalfplane &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:503
constexpr bool interiorContains(const OtherPolygon &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1273
constexpr bool interiorContains(const OtherRay &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:497
constexpr bool contains(const OtherPolygon &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1745
bool separates(const OtherSet &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5942
constexpr bool interiorContains(const OtherDisk &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1265
constexpr bool interiorContains(const OtherSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:485
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
constexpr PointType & target()
Definition ray.hpp:196
constexpr bool intersects(const OtherLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:415
constexpr bool containsCollinear(const OtherPoint &point) const
Returns whether the ray contains the given point that is collinear with the ray.
Definition predicates.hpp:754
constexpr std::ptrdiff_t index(const PointType &point) const
Definition ray.hpp:167
constexpr bool separates(const OtherTriangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1080
constexpr bool interiorsIntersect(const Shape< PointType > &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:535
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:273
constexpr A & label() const
Definition ray.hpp:303
constexpr bool collinear(const OtherSegment &other) const
Returns whether the given segment is collinear with the ray.
Definition predicates.hpp:784
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 ray.hpp:1283
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
constexpr bool contains(const OtherHalfplane &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:664
constexpr auto end() const
Returns an iterator past the target point.
Definition ray.hpp:253
constexpr bool samePointSet(const OtherShape &other) const
Tests whether another shape defines exactly the same point set.
Definition samepointset.hpp:1971
detail::promoted_number_t< NumberType > CoordinateType
Definition ray.hpp:55
constexpr bool contains(const OtherRectangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:670
constexpr bool boundaryContains(const OtherRegion &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1674
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherRay &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:451
constexpr Ray()=default
Creates the degenerate ray (0,0)--(0,0)->.
PointType PointType
Definition ray.hpp:52
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:378
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:467
constexpr auto distanceLInf(const OtherSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:352
constexpr bool collinear(const OtherOrientedSegment &other) const
Returns whether the given oriented segment is collinear with the ray.
Definition predicates.hpp:790
constexpr ResultNumber area() const
Returns the area of the ray.
Definition measures.hpp:248
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:333
detail::floating_result_t< ResultNumber > squaredDistance(const Disk< DiskPointType, DiskLabel > &disk) const
Returns the squared Euclidean distance to a disk.
Definition ray.hpp:1205
constexpr bool separates(const OtherPolygon &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1150
constexpr bool contains(const Shape< PointType > &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:712
constexpr auto operator<=>(const Ray &other) const
Provides an ordering compatible with ray equality.
Definition predicates.hpp:718
constexpr bool interiorsIntersect(const OtherRay &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:501
constexpr bool contains(const OtherConvex &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:690
constexpr bool collinear(const OtherRay &other) const
Returns whether another ray is collinear with this ray.
Definition predicates.hpp:796
constexpr bool crosses(const OtherOrientedLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:339
constexpr bool interiorsIntersect(const OtherLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:433
constexpr auto distanceL1(const OtherRay &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:392
constexpr bool interiorsIntersect(const OtherSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:458
constexpr bool parallel(const OtherRay &other) const
Returns whether another ray is parallel to this ray.
Definition predicates.hpp:832
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:323
constexpr bool separates(const OtherOrientedSegment &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1018
constexpr bool isDegenerate() const
Returns whether the defining points coincide.
Definition predicates.hpp:727
constexpr Ray scaledUpY(const OtherNumber scalar) const
Returns the ray with its y-coordinates multiplied by a factor.
constexpr Ray(NumberType x1, NumberType y1, NumberType x2, NumberType y2, A &&label)
Same as the four-coordinate constructor, and stores a label.
Definition ray.hpp:101
constexpr bool parallel(const OtherOrientedLine &other) const
Returns whether the given oriented line is parallel to the ray.
Definition predicates.hpp:814
constexpr bool crosses(const OtherRay &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:357
constexpr PointType & source()
Definition ray.hpp:184
constexpr EmptyShape< EmptyPoint > intersection(const EmptyShape< EmptyPoint > &) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition ray.hpp:1112
constexpr PointType & get(std::ptrdiff_t index)
Definition ray.hpp:158
constexpr bool intersects(const EmptyShape< EmptyPoint > &) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition ray.hpp:773
constexpr bool interiorContains(const OtherOrientedSegment &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:491
constexpr auto distanceLInf(const OtherOrientedSegment &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:366
constexpr bool intersects(const OtherOrientedSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:459
constexpr OrientedLine< PointType > asOrientedLine() const
Returns the oriented supporting line.
Definition ray.hpp:335
constexpr void scaleDownY(const OtherNumber scalar)
Divides the ray's y-coordinates by a divisor in place.
Definition transformations.hpp:1060
constexpr bool contains(const OtherPolyline &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2400
constexpr bool contains(const OtherTriangle &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:684
constexpr bool intersects(const OtherShape &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition ray.hpp:767
constexpr Ray opposite() const
Returns the ray obtained by swapping the two stored defining points.
Definition ray.hpp:223
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherOrientedLine &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:368
constexpr bool contains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition ray.hpp:579
constexpr auto distanceL1(const OtherOrientedSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:378
constexpr bool separates(const OtherRectangle &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1070
constexpr bool separates(const OtherHalfplane &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1064
PointType::NumberType NumberType
Definition ray.hpp:53
constexpr bool boundaryContains(const OtherPolygon &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:494
constexpr auto squaredDistance(const OtherSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:348
constexpr const PointType & max() const
Returns the lexicographically largest stored defining point.
Definition ray.hpp:214
constexpr bool interiorsIntersect(const EmptyShape< EmptyPoint > &) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition ray.hpp:810
constexpr Ray & operator+=(const OtherPoint &translation)
Translates the ray by the given point in place.
constexpr void scaleUpY(const OtherNumber scalar)
Multiplies the ray's y-coordinates by a factor in place.
Definition transformations.hpp:1034
constexpr auto distanceL1(const OtherOrientedLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:355
constexpr bool interiorContains(const OtherRegion &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2076
constexpr const PointType & target() const
Definition ray.hpp:193
constexpr bool separates(const OtherRay &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1037
constexpr auto squaredDistance(const OtherOrientedLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:338
constexpr auto squaredDistance(const OtherLine &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:328
constexpr bool crosses(const EmptyShape< EmptyPoint > &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition ray.hpp:850
constexpr bool parallel(const OtherSegment &other) const
Returns whether the given segment is parallel to the ray.
Definition predicates.hpp:820
constexpr bool verticesContain(const OtherPoint &point) const
Returns whether the given point is one of the stored defining points.
Definition predicates.hpp:748
constexpr bool boundaryContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:584
bool separates(const OtherRegion &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5683
constexpr auto cbegin() const
Returns an iterator to the source point.
Definition ray.hpp:244
constexpr bool separates(const OtherChain &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3173
constexpr auto minkowskiSum(const OtherShape &other) const
Returns the Minkowski sum of this shape and another (A ⊕ B).
Definition minkowski.hpp:798
constexpr ResultNumber slope() const
Returns the slope of the supporting line.
Definition measures.hpp:259
constexpr bool boundaryContains(const OtherHalfplane &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:473
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:987
constexpr bool boundaryContains(const OtherDisk &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:500
TLabel LabelType
Definition ray.hpp:54
constexpr auto distanceLInf(const OtherRay &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:380
constexpr bool interiorsIntersect(const OtherPoint &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:426
constexpr bool interiorContains(const OtherPolyline &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1714
constexpr bool collinear(const OtherLine &other) const
Returns whether the given line is collinear with the ray.
Definition predicates.hpp:772
constexpr bool intersects(const OtherSegment &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:439
constexpr bool contains(const OtherChain &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2038
constexpr bool interiorsIntersect(const OtherOrientedSegment &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:495
constexpr Ray(PointType source, PointType target, A &&label)
Creates a ray from a source and a second point and stores a label.
Definition ray.hpp:95
constexpr auto squaredDistance(const OtherShape &other) const
Returns the squared Euclidean distance to the given shape.
Definition ray.hpp:1193
constexpr const PointType & operator[](std::size_t index) const
Returns defining point 0 for the source and 1 for the target.
Definition ray.hpp:133
constexpr bool isHorizontal() const
Returns whether the ray is horizontal.
Definition predicates.hpp:742
constexpr Halfplane< PointType > halfplaneBelow() const
Returns the half-plane geometrically below the supporting line.
Definition predicates.hpp:848
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:254
constexpr auto end()
Definition ray.hpp:256
constexpr bool separates(const OtherPolyline &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:3978
constexpr auto squaredDistance(const OtherRay &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:376
constexpr void rotate90(int k=1)
Rotates the ray by 90k degrees around the origin in place.
Definition transformations.hpp:1008
constexpr const PointType & min() const
Returns the lexicographically smallest stored defining point.
Definition ray.hpp:205
constexpr bool boundaryContains(const OtherPolyline &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:934
constexpr void scaleUpX(const OtherNumber scalar)
Multiplies the ray's x-coordinates by a factor in place.
Definition transformations.hpp:1021
constexpr PointType & operator[](std::size_t index)
Returns defining point 0 for the source and 1 for the target.
Definition ray.hpp:138
constexpr bool separates(const OtherLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1024
constexpr bool interiorsIntersect(const OtherOrientedLine &other) const
Tests whether the interiors of the two shapes intersect ((A∖∂A) ∩ (B∖∂B) ≠ ∅).
Definition interiorsintersect.hpp:452
constexpr auto distanceLInf(const OtherLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:334
constexpr auto squaredDistance(const OtherOrientedSegment &other) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:362
constexpr bool interiorContains(const OtherSet &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition ray.hpp:1028
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Ray< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherLine &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:336
constexpr auto begin()
Definition ray.hpp:235
constexpr bool boundaryContains(const OtherChain &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:915
constexpr auto squaredDistance(const OtherPoint &point) const
Returns the squared Euclidean distance to the given shape.
Definition distance.hpp:300
constexpr auto distanceLInf(const OtherPoint &point) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:327
constexpr bool separates(const Shape< PointType > &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1161
constexpr bool contains(const OtherOrientedLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:640
constexpr auto distanceL1(const OtherLine &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:346
static constexpr std::size_t size()
Returns the number of defining points (always 2).
Definition ray.hpp:146
constexpr bool parallel(const OtherOrientedSegment &other) const
Returns whether the given oriented segment is parallel to the ray.
Definition predicates.hpp:826
constexpr bool separates(const OtherDisk &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1133
constexpr bool contains(const OtherLine &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:634
constexpr bool boundaryContains(const OtherOrientedSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:458
constexpr bool interiorContains(const OtherTriangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:521
constexpr bool contains(const OtherSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:646
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:409
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:242
constexpr auto distanceL1(const OtherShape &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition ray.hpp:1263
constexpr NumberType twiceArea() const
Returns twice the area of the ray.
Definition measures.hpp:253
constexpr Ray scaledUpX(const OtherNumber scalar) const
Returns the ray with its x-coordinates multiplied by a factor.
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 ray.hpp:1348
constexpr bool contains(const OtherOrientedSegment &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:652
constexpr bool boundaryContains(const OtherConvex &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:488
constexpr Ray(PointType source, PointType target)
Creates a ray from a source and a second point on the ray.
Definition ray.hpp:72
constexpr std::optional< std::variant< Point< ResultNumber, typename PointType::LabelType >, Segment< Point< ResultNumber, typename PointType::LabelType > > > > intersection(const OtherOrientedSegment &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition intersection.hpp:440
constexpr bool interiorContains(const OtherOrientedLine &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:479
constexpr Ray scaledDownX(const OtherNumber scalar) const
Returns the ray with its x-coordinates divided by a divisor.
constexpr bool boundaryContains(const OtherRectangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:476
constexpr bool crosses(const Shape< PointType > &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:368
constexpr Point< ResultNumber > pointInside() const
Returns a point inside the ray.
Definition measures.hpp:267
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:625
constexpr auto closestPoints(const OtherShape &other) const
Returns the pair of points realizing the distance, nothing when the shapes meet.
Definition closest.hpp:468
constexpr Line< PointType > asLine() const
Returns the supporting line without orientation.
Definition ray.hpp:319
constexpr auto distanceL1(const OtherPoint &point) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:339
constexpr bool interiorContains(const OtherChain &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1488
constexpr bool isUndefined() const
Returns whether the ray is degenerate without collapsing to a point or to a segment.
Definition predicates.hpp:732
constexpr auto distanceL1(const OtherSegment &other) const
Returns the Manhattan (L1) distance to the given shape.
Definition distancel1.hpp:364
constexpr bool boundaryContains(const OtherLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:464
constexpr bool boundaryContains(const OtherSegment &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:452
constexpr const PointType & source() const
Definition ray.hpp:181
constexpr bool boundaryContains(const Shape< PointType > &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1116
constexpr auto distanceLInf(const OtherShape &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition ray.hpp:1335
constexpr bool crosses(const OtherShape &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition ray.hpp:844
constexpr auto intersection(const OtherShape &other) const
Returns the intersection of the two shapes (A ∩ B), empty when they are disjoint.
Definition ray.hpp:1106
constexpr bool intersects(const OtherOrientedLine &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:433
constexpr bool intersects(const OtherRay &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:465
constexpr bool boundaryContains(const OtherTriangle &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:482
constexpr bool boundaryContains(const OtherOrientedLine &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:467
constexpr bool crosses(const OtherOrientedSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:351
constexpr Ray rotated90(int k=1) const
Returns the ray rotated by 90k degrees around the origin.
Definition transformations.hpp:1003
constexpr bool boundaryContains(const OtherSet &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition ray.hpp:1017
constexpr bool separates(const OtherOrientedLine &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1031
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition ray.hpp:594
constexpr bool contains(const OtherRegion &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2771
constexpr auto begin() const
Returns an iterator to the source point.
Definition ray.hpp:232
constexpr bool interiorContains(const OtherRectangle &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:509
constexpr auto distanceLInf(const OtherOrientedLine &other) const
Returns the Chebyshev (LInf) distance to the given shape.
Definition distancelinf.hpp:343
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