23template <
class Number,
class Label>
24template<Po
intConcept OtherPo
int>
36template <
class Po
intType,
class LabelType>
37template<SegmentConcept OtherSegment>
39 using Coordinate = detail::sign_coordinate_t<NumberType, typename OtherSegment::NumberType>;
43 const auto a = detail::filtered<Coordinate>(
min());
44 const auto b = detail::filtered<Coordinate>(
max());
45 const auto c = detail::filtered<Coordinate>(other.min());
46 const auto d = detail::filtered<Coordinate>(other.max());
47 const auto s1 = detail::orientationSignOf(a, b, c);
48 const auto s2 = detail::orientationSignOf(a, b, d);
49 const auto s3 = detail::orientationSignOf(c, d, a);
50 const auto s4 = detail::orientationSignOf(c, d, b);
52 if (detail::allDecided(s1, s2, s3, s4)) {
53 return s1.value() != s2.value() && s3.value() != s4.value();
57 const int cross = boundingBoxesCross(other);
66 const auto d1 = s1.value();
70 const auto d2 = s2.value();
71 if (d1 == d2 || d2 == 0) {
74 const auto d3 = s3.value();
78 const auto d4 = s4.value();
79 return d4 != 0 && d3 != d4;
82template <
class Po
intType,
class LabelType>
83template<Po
intConcept OtherPo
int>
88template <
class Po
intType,
class LabelType>
91 [
this](
const auto& value) {
103template <
class Po
intType,
class LabelType>
104template<SegmentConcept OtherSegment>
106 return separates(other) && other.separates(*
this);
109template <
class Po
intType,
class LabelType>
110template<Po
intConcept OtherPo
int>
115template <
class Po
intType,
class LabelType>
116template<OrientedSegmentConcept OtherOrientedSegment>
118 return separates(other) && other.separates(*
this);
121template <
class Po
intType,
class LabelType>
122template<LineConcept OtherLine>
124 return separates(other) && other.separates(*
this);
127template <
class Po
intType,
class LabelType>
128template<OrientedLineConcept OtherOrientedLine>
130 return separates(other) && other.separates(*
this);
133template <
class Po
intType,
class LabelType>
134template<RayConcept OtherRay>
136 return separates(other) && other.separates(*
this);
139template <
class Po
intType,
class LabelType>
140template<HalfplaneConcept OtherHalfplane>
145template <
class Po
intType,
class LabelType>
146template<RectangleConcept OtherRectangle>
152 return separates(other) && other.separates(*
this);
155template <
class Po
intType,
class LabelType>
156template<TriangleConcept OtherTriangle>
158 return separates(other) && other.separates(*
this);
161template <
class Po
intType,
class LabelType>
164 [
this](
const auto& value) {
176template <
class Po
intType,
class LabelType>
177template<SegmentConcept OtherSegment>
182template <
class Po
intType,
class LabelType>
183template<OrientedSegmentConcept OtherOrientedSegment>
185 return this->
asSegment().crosses(other.asSegment());
188template <
class Po
intType,
class LabelType>
189template<Po
intConcept OtherPo
int>
194template <
class Po
intType,
class LabelType>
197 [
this](
const auto& value) {
209template <
class Po
intType,
class LabelType>
210template<LineConcept OtherLine>
212 if (
isDegenerate() || other.isDegenerate() || *
this == other) {
218template <
class Po
intType,
class LabelType>
219template<Po
intConcept OtherPo
int>
224template <
class Po
intType,
class LabelType>
225template<SegmentConcept OtherSegment>
227 return separates(other) && other.separates(*
this);
230template <
class Po
intType,
class LabelType>
231template<OrientedSegmentConcept OtherOrientedSegment>
233 return crosses(other.asSegment());
236template <
class Po
intType,
class LabelType>
239 [
this](
const auto& value) {
251template <
class Po
intType,
class LabelType>
252template<LineConcept OtherLine>
254 return this->
asLine().crosses(other);
257template <
class Po
intType,
class LabelType>
258template<OrientedLineConcept OtherOrientedLine>
260 return this->
asLine().crosses(other.asLine());
263template <
class Po
intType,
class LabelType>
264template<Po
intConcept OtherPo
int>
266 return this->
asLine().crosses(other);
269template <
class Po
intType,
class LabelType>
270template<SegmentConcept OtherSegment>
272 return this->
asLine().crosses(other);
275template <
class Po
intType,
class LabelType>
276template<OrientedSegmentConcept OtherOrientedSegment>
278 return this->
asLine().crosses(other);
281template <
class Po
intType,
class LabelType>
284 [
this](
const auto& value) {
290template <
class Po
intType,
class LabelType>
291template <LineConcept OtherLine>
292constexpr std::partial_ordering
294 const OtherLine& second)
const {
300 const auto crossing = [&](
const OtherLine& line) {
303 return std::pair{p, p - q};
305 const auto [p1, d1] = crossing(first);
306 const auto [p2, d2] = crossing(second);
307 if (d1 == 0 || d2 == 0) {
308 return std::partial_ordering::unordered;
314 using Wide = detail::promoted_number_t<std::remove_cvref_t<
decltype(p1)>>;
315 const auto cross = detail::threeWay(detail::asNumber<Wide>(p1) * detail::asNumber<Wide>(d2),
316 detail::asNumber<Wide>(p2) * detail::asNumber<Wide>(d1));
318 return std::partial_ordering::equivalent;
320 const bool denominators_agree = (d1 < 0) == (d2 < 0);
321 const bool first_is_earlier = (cross < 0) == denominators_agree;
322 return first_is_earlier ? std::partial_ordering::less : std::partial_ordering::greater;
331template <
class Po
intType,
class LabelType>
332template<LineConcept OtherLine>
334 return separates(other) && other.separates(*
this);
337template <
class Po
intType,
class LabelType>
338template<OrientedLineConcept OtherOrientedLine>
340 return separates(other) && other.separates(*
this);
343template <
class Po
intType,
class LabelType>
344template<SegmentConcept OtherSegment>
346 return separates(other) && other.separates(*
this);
349template <
class Po
intType,
class LabelType>
350template<OrientedSegmentConcept OtherOrientedSegment>
352 return separates(other) && other.separates(*
this);
355template <
class Po
intType,
class LabelType>
356template<RayConcept OtherRay>
358 return separates(other) && other.separates(*
this);
361template <
class Po
intType,
class LabelType>
362template<Po
intConcept OtherPo
int>
367template <
class Po
intType,
class LabelType>
370 [
this](
const auto& value) {
382template <
class Po
intType,
class LabelType>
383template<RectangleConcept OtherRectangle>
391 min().x() < other.min().x() &&
392 other.max().x() <
max().x() &&
393 other.min().y() <
min().y() &&
394 max().y() < other.max().y();
396 return !
empty() && !other.empty();
399 other.min().x() <
min().x() &&
400 max().x() < other.max().x() &&
401 min().y() < other.min().y() &&
402 other.max().y() <
max().y();
403 return ver_hor && !
empty() && !other.empty();
406template <
class Po
intType,
class LabelType>
407template<Po
intConcept OtherPo
int>
412template <
class Po
intType,
class LabelType>
413template<LineConcept OtherLine>
419 return separates(other) && other.separates(*
this);
422template <
class Po
intType,
class LabelType>
423template<OrientedLineConcept OtherOrientedLine>
429 return separates(other) && other.separates(*
this);
432template <
class Po
intType,
class LabelType>
433template<SegmentConcept OtherSegment>
439 return separates(other) && other.separates(*
this);
442template <
class Po
intType,
class LabelType>
443template<OrientedSegmentConcept OtherOrientedSegment>
449 return separates(other) && other.separates(*
this);
452template <
class Po
intType,
class LabelType>
453template<RayConcept OtherRay>
459 return separates(other) && other.separates(*
this);
462template <
class Po
intType,
class LabelType>
463template<HalfplaneConcept OtherHalfplane>
473template <
class Po
intType,
class LabelType>
476 [
this](
const auto& value) {
488template <
class Po
intType,
class LabelType>
489template<Po
intConcept OtherPo
int>
494template <
class Po
intType,
class LabelType>
495template<LineConcept OtherLine>
501template <
class Po
intType,
class LabelType>
502template<OrientedLineConcept OtherOrientedLine>
508template <
class Po
intType,
class LabelType>
509template<SegmentConcept OtherSegment>
515template <
class Po
intType,
class LabelType>
516template<OrientedSegmentConcept OtherOrientedSegment>
522template <
class Po
intType,
class LabelType>
523template<RayConcept OtherRay>
529template <
class Po
intType,
class LabelType>
530template<HalfplaneConcept OtherHalfplane>
536template <
class Po
intType,
class LabelType>
539 [
this](
const auto& value) {
549template <
class Po
intType,
class LabelType>
550template<Po
intConcept OtherPo
int>
555template <
class Po
intType,
class LabelType>
556template<SegmentConcept OtherSegment>
558 return separates(other) && other.separates(*
this);
561template <
class Po
intType,
class LabelType>
562template<OrientedSegmentConcept OtherOrientedSegment>
567template <
class Po
intType,
class LabelType>
568template<LineConcept OtherLine>
570 return separates(other) && other.separates(*
this);
573template <
class Po
intType,
class LabelType>
574template<OrientedLineConcept OtherOrientedLine>
579template <
class Po
intType,
class LabelType>
580template<RayConcept OtherRay>
582 return separates(other) && other.separates(*
this);
585template <
class Po
intType,
class LabelType>
586template<HalfplaneConcept OtherHalfplane>
591template <
class Po
intType,
class LabelType>
592template<RectangleConcept OtherRectangle>
598 return crosses(other.asConvex());
601template <
class Po
intType,
class LabelType>
602template<TriangleConcept OtherTriangle>
604 return crosses(other.asConvex());
607template <
class Po
intType,
class LabelType>
608template<ConvexConcept OtherConvex>
613 return separates(other) && other.separates(*
this);
616template <
class Po
intType,
class LabelType>
617template<DiskConcept OtherDisk>
619 return (
separates(other) && other.separates(*
this));
622template <
class Po
intType,
class LabelType>
623template <Po
intConcept OtherPo
int>
626 [
this](
const auto& value) {
632template <
class Po
intType,
class LabelType>
633template<Po
intConcept OtherPo
int>
638template <
class Po
intType,
class LabelType>
639template<SegmentConcept OtherSegment>
641 return separates(other) && other.separates(*
this);
644template <
class Po
intType,
class LabelType>
645template<OrientedSegmentConcept OtherOrientedSegment>
647 return crosses(other.asSegment());
650template <
class Po
intType,
class LabelType>
651template<RayConcept OtherRay>
653 return separates(other) && other.separates(*
this);
656template <
class Po
intType,
class LabelType>
657template<LineConcept OtherLine>
659 return separates(other) && other.separates(*
this);
662template <
class Po
intType,
class LabelType>
663template<OrientedLineConcept OtherOrientedLine>
665 return separates(other) && other.separates(*
this);
668template <
class Po
intType,
class LabelType>
669template<HalfplaneConcept OtherHalfplane>
674template <
class Po
intType,
class LabelType>
675template<RectangleConcept OtherRectangle>
681 return separates(other) && other.separates(*
this);
684template <
class Po
intType,
class LabelType>
685template<TriangleConcept OtherTriangle>
687 return separates(other) && other.separates(*
this);
690template <
class Po
intType,
class LabelType>
691template<ConvexConcept OtherConvex>
693 return separates(other) && other.separates(*
this);
696template <
class Po
intType,
class LabelType>
697template<DiskConcept OtherDisk>
699 return separates(other) && other.separates(*
this);
702template <
class Po
intType,
class LabelType>
703template<PolygonConcept OtherPolygon>
705 return separates(other) && other.separates(*
this);
708template <
class Po
intType,
class LabelType>
709template<Po
intConcept OtherPo
int>
712 [
this](
const auto& value) {
718template <
class Number,
class Label>
721 [
this](
const auto& value) {
722 return this->crosses(value);
730template <
class Po
intType,
class LabelType>
731template<Po
intConcept OtherPo
int>
736template <
class Po
intType,
class LabelType>
737template<SegmentConcept OtherSegment>
739 return separates(other) && other.separates(*
this);
742template <
class Po
intType,
class LabelType>
743template<OrientedSegmentConcept OtherOrientedSegment>
745 return crosses(other.asSegment());
748template <
class Po
intType,
class LabelType>
749template<LineConcept OtherLine>
751 return separates(other) && other.separates(*
this);
754template <
class Po
intType,
class LabelType>
755template<OrientedLineConcept OtherOrientedLine>
757 return separates(other) && other.separates(*
this);
760template <
class Po
intType,
class LabelType>
761template<RayConcept OtherRay>
763 return separates(other) && other.separates(*
this);
766template <
class Po
intType,
class LabelType>
767template<HalfplaneConcept OtherHalfplane>
769 return separates(other) && other.separates(*
this);
772template <
class Po
intType,
class LabelType>
773template<RectangleConcept OtherRectangle>
779 return separates(other) && other.separates(*
this);
782template <
class Po
intType,
class LabelType>
783template<TriangleConcept OtherTriangle>
785 return separates(other) && other.separates(*
this);
788template <
class Po
intType,
class LabelType>
789template<DiskConcept OtherDisk>
791 return separates(other) && other.separates(*
this);
794template <
class Po
intType,
class LabelType>
795template<Po
intConcept OtherPo
int>
798 [
this](
const auto& value) {
811template <
class Po
intType,
class LabelType,
class Storage>
812template<SegmentConcept OtherSegment>
814 return separates(other) && other.separates(*
this);
817template <
class Po
intType,
class LabelType,
class Storage>
818template<OrientedSegmentConcept OtherOrientedSegment>
820 return crosses(other.asSegment());
823template <
class Po
intType,
class LabelType,
class Storage>
824template<LineConcept OtherLine>
826 return separates(other) && other.separates(*
this);
829template <
class Po
intType,
class LabelType,
class Storage>
830template<OrientedLineConcept OtherOrientedLine>
832 return separates(other) && other.separates(*
this);
835template <
class Po
intType,
class LabelType,
class Storage>
836template<RayConcept OtherRay>
838 return separates(other) && other.separates(*
this);
841template <
class Po
intType,
class LabelType,
class Storage>
842template<HalfplaneConcept OtherHalfplane>
844 return separates(other) && other.separates(*
this);
847template <
class Po
intType,
class LabelType,
class Storage>
848template<RectangleConcept OtherRectangle>
854 return separates(other) && other.separates(*
this);
857template <
class Po
intType,
class LabelType,
class Storage>
858template<TriangleConcept OtherTriangle>
860 return separates(other) && other.separates(*
this);
863template <
class Po
intType,
class LabelType,
class Storage>
864template<DiskConcept OtherDisk>
866 return separates(other) && other.separates(*
this);
869template <
class Po
intType,
class LabelType,
class Storage>
870template<ConvexConcept OtherConvex>
872 return separates(other) && other.separates(*
this);
875template <
class Po
intType,
class LabelType,
class Storage>
876template<MonotoneChainConcept OtherChain>
878 return separates(other) && other.separates(*
this);
881template <
class Po
intType,
class LabelType,
class Storage>
882template<Po
intConcept OtherPo
int>
885 [
this](
const auto& value) {
891template <
class Po
intType,
class LabelType,
class Storage>
892template<MonotoneChainConcept OtherChain>
894 if (
size() < 2 || other.size() < 2) {
906 const std::size_t iEnd =
size() - 1;
907 const std::size_t jEnd = other.size() - 1;
912 using XType = std::common_type_t<NumberType, typename OtherChain::PointType::NumberType>;
913 const XType xlo = std::max<XType>((*
this)[0].
x(), other[0].
x());
915 const auto jSeed = other.indexAtX(xlo);
918 std::size_t i = (iSeed && jSeed) ? (*iSeed > 0 ? *iSeed - 1 : 0) : iEnd;
919 std::size_t j = (iSeed && jSeed) ? (*jSeed > 0 ? *jSeed - 1 : 0) : jEnd;
920 while (i < iEnd && j < jEnd) {
923 if (!(mine.
max().x() < theirs.
min().x() || theirs.
max().x() < mine.
min().x()) &&
927 const auto order = mine.
max() <=> theirs.
max();
938template <
class Po
intType,
class LabelType>
939template<MonotoneChainConcept OtherChain>
941 return separates(other) && other.separates(*
this);
950template <
class Po
intType,
class LabelType>
951template<SegmentConcept OtherSegment>
953 return separates(other) && other.separates(*
this);
956template <
class Po
intType,
class LabelType>
957template<OrientedSegmentConcept OtherOrientedSegment>
959 return crosses(other.asSegment());
962template <
class Po
intType,
class LabelType>
963template<LineConcept OtherLine>
965 return separates(other) && other.separates(*
this);
968template <
class Po
intType,
class LabelType>
969template<OrientedLineConcept OtherOrientedLine>
971 return separates(other) && other.separates(*
this);
974template <
class Po
intType,
class LabelType>
975template<RayConcept OtherRay>
977 return separates(other) && other.separates(*
this);
980template <
class Po
intType,
class LabelType>
981template<HalfplaneConcept OtherHalfplane>
983 return separates(other) && other.separates(*
this);
986template <
class Po
intType,
class LabelType>
987template<RectangleConcept OtherRectangle>
993 return separates(other) && other.separates(*
this);
996template <
class Po
intType,
class LabelType>
997template<TriangleConcept OtherTriangle>
999 return separates(other) && other.separates(*
this);
1002template <
class Po
intType,
class LabelType>
1003template<DiskConcept OtherDisk>
1005 return separates(other) && other.separates(*
this);
1008template <
class Po
intType,
class LabelType>
1009template<ConvexConcept OtherConvex>
1011 return separates(other) && other.separates(*
this);
1014template <
class Po
intType,
class LabelType>
1015template<MonotoneChainConcept OtherChain>
1017 return separates(other) && other.separates(*
this);
1020template <
class Po
intType,
class LabelType>
1021template<PolylineConcept OtherPolyline>
1023 return separates(other) && other.separates(*
this);
1026template <
class Po
intType,
class LabelType>
1027template<Po
intConcept OtherPo
int>
1030 [
this](
const auto& value) {
1036template <
class Po
intType,
class LabelType>
1037template<PolylineConcept OtherPolyline>
1039 return separates(other) && other.separates(*
this);
1050template <
class Po
intType,
class LabelType>
1051template <Po
intConcept OtherPo
int>
1057template <
class Po
intType,
class LabelType>
1058template <SegmentConcept OtherSegment>
1060 return separates(other) && other.separates(*
this);
1063template <
class Po
intType,
class LabelType>
1064template <OrientedSegmentConcept OtherOrientedSegment>
1069template <
class Po
intType,
class LabelType>
1070template <LineConcept OtherLine>
1072 return separates(other) && other.separates(*
this);
1075template <
class Po
intType,
class LabelType>
1076template <OrientedLineConcept OtherOrientedLine>
1078 return crosses(other.asLine());
1081template <
class Po
intType,
class LabelType>
1082template <RayConcept OtherRay>
1084 return separates(other) && other.separates(*
this);
1087template <
class Po
intType,
class LabelType>
1088template <HalfplaneConcept OtherHalfplane>
1095template <
class Po
intType,
class LabelType>
1096template <RectangleConcept OtherRectangle>
1098 if (other.empty()) {
1102 return separates(other) && other.separates(*
this);
1105template <
class Po
intType,
class LabelType>
1106template <TriangleConcept OtherTriangle>
1108 return separates(other) && other.separates(*
this);
1111template <
class Po
intType,
class LabelType>
1112template <DiskConcept OtherDisk>
1114 return separates(other) && other.separates(*
this);
1117template <
class Po
intType,
class LabelType>
1118template <ConvexConcept OtherConvex>
1120 return separates(other) && other.separates(*
this);
1123template <
class Po
intType,
class LabelType>
1124template <MonotoneChainConcept OtherChain>
1126 return separates(other) && other.separates(*
this);
1129template <
class Po
intType,
class LabelType>
1130template <PolylineConcept OtherPolyline>
1132 return separates(other) && other.separates(*
this);
1135template <
class Po
intType,
class LabelType>
1136template <PolygonConcept OtherPolygon>
1138 return separates(other) && other.separates(*
this);
1141template <
class Po
intType,
class LabelType>
1142template <HalfplaneIntersectionConcept OtherRegion>
1144 return separates(other) && other.separates(*
this);
1147template <
class Po
intType,
class LabelType>
1148template <Po
intConcept OtherPo
int>
1151 [
this](
const auto& value) {
1166template <
class Po
intType,
class LabelType>
1167template <Po
intConcept OtherPo
int>
1172template <
class Po
intType,
class LabelType>
1173template <SegmentConcept OtherSegment>
1175 return separates(other) && other.separates(*
this);
1178template <
class Po
intType,
class LabelType>
1179template <OrientedSegmentConcept OtherOrientedSegment>
1181 return separates(other) && other.separates(*
this);
1184template <
class Po
intType,
class LabelType>
1185template <LineConcept OtherLine>
1187 return separates(other) && other.separates(*
this);
1190template <
class Po
intType,
class LabelType>
1191template <OrientedLineConcept OtherOrientedLine>
1193 return separates(other) && other.separates(*
this);
1196template <
class Po
intType,
class LabelType>
1197template <RayConcept OtherRay>
1199 return separates(other) && other.separates(*
this);
1202template <
class Po
intType,
class LabelType>
1203template <HalfplaneConcept OtherHalfplane>
1205 return separates(other) && other.separates(*
this);
1208template <
class Po
intType,
class LabelType>
1209template <RectangleConcept OtherRectangle>
1211 if (other.empty()) {
1215 return separates(other) && other.separates(*
this);
1218template <
class Po
intType,
class LabelType>
1219template <TriangleConcept OtherTriangle>
1221 return separates(other) && other.separates(*
this);
1224template <
class Po
intType,
class LabelType>
1225template <ConvexConcept OtherConvex>
1227 return separates(other) && other.separates(*
this);
1230template <
class Po
intType,
class LabelType>
1231template <PolygonConcept OtherPolygon>
1233 return separates(other) && other.separates(*
this);
1236template <
class Po
intType,
class LabelType>
1237template <PolygonWithHolesConcept OtherRegion>
1239 return separates(other) && other.separates(*
this);
1242template <
class Po
intType,
class LabelType>
1243template <MonotoneChainConcept OtherChain>
1245 return separates(other) && other.separates(*
this);
1248template <
class Po
intType,
class LabelType>
1249template <PolylineConcept OtherPolyline>
1251 return separates(other) && other.separates(*
this);
1254template <
class Po
intType,
class LabelType>
1255template <DiskConcept OtherDisk>
1257 return separates(other) && other.separates(*
this);
1260template <
class Po
intType,
class LabelType>
1261template <HalfplaneIntersectionConcept OtherIntersection>
1263 return separates(other) && other.separates(*
this);
1270template <
class Po
intType,
class LabelType>
1271template <Po
intConcept OtherPo
int>
1274 [
this](
const auto& value) {
1284template <
class Po
intType,
class LabelType>
1285template <detail::SetOperandConcept OtherShape>
1290 return separates(other) && other.separates(*
this);
1294template <
class Po
intType,
class LabelType>
1295template <PolygonSetConcept OtherSet>
1297 return separates(other) && other.separates(*
this);
1300template <
class Po
intType,
class LabelType>
1301template <Po
intConcept OtherPo
int>
1303 return std::visit([
this](
const auto& value) {
return this->
crosses(value); }, other.
variant());
Definition forward.hpp:306
Implementations of the 'contains' predicate.
Definition arrangement.hpp:67
@ x
Definition intervaltree.hpp:24
constexpr bool is_Rational_v
Definition rational.hpp:37
constexpr auto orientationDeterminant(const Point< ANumber, ALabel > &a, const Point< BNumber, BLabel > &b, const Point< CNumber, CLabel > &c)
Returns the signed orientation determinant of three points.
Definition orientation.hpp:518
Small dispatch traits and geometry helpers reused by the implementations.
constexpr const Rectangle< PointType > & bbox() const
Computes the bounding box of the convex polygon.
Definition bounding.hpp:374
constexpr bool crosses(const OtherPoint &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:551
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition convex.hpp:1345
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:732
constexpr bool separates(const OtherPolygon &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:2294
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:1052
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:4050
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:496
Unoriented infinite line.
Definition line.hpp:52
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition line.hpp:579
constexpr bool parallel(const OtherLine &other) const
Returns whether another line is parallel to this line.
Definition predicates.hpp:508
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:211
constexpr bool isDegenerate() const
Returns whether the defining points coincide.
Definition predicates.hpp:451
constexpr std::optional< std::size_t > indexAtX(const OtherNumber &x) const
Locates the vertex or edge of the chain at a given x-coordinate.
Definition atxy.hpp:346
constexpr bool edgesCross(const OtherChain &other) const
Tests whether the two chains have edges that cross.
Definition crosses.hpp:893
constexpr std::size_t size() const
Returns the number of vertices in the chain.
Definition monotonechain.hpp:393
constexpr bool separates(const OtherPoint &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition monotonechain.hpp:1374
constexpr bool crosses(const OtherPoint &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition monotonechain.hpp:1584
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:253
constexpr const PointType & target() const
Returns the target defining point.
Definition orientedline.hpp:195
constexpr std::partial_ordering crossingOrder(const OtherLine &first, const OtherLine &second) const
Orders two lines by where they cross this oriented line.
Definition crosses.hpp:293
constexpr Line< PointType > asLine() const
Returns the line without orientation.
Definition orientedline.hpp:321
constexpr const PointType & source() const
Returns the source defining point.
Definition orientedline.hpp:183
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 Segment< PointType > asSegment() const
Returns the segment without orientation.
Definition orientedsegment.hpp:322
Two-dimensional point with optional label payload.
Definition point.hpp:129
constexpr bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:25
bool crosses(const OtherShape &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:1286
bool separates(const OtherShape &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5849
bool crosses(const OtherPoint &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:1168
bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:5467
constexpr bool crosses(const OtherChain &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:940
constexpr bool separates(const OtherPoint &other) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition separates.hpp:1864
constexpr bool separates(const OtherPoint &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition polyline.hpp:1176
constexpr bool crosses(const OtherPoint &) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition polyline.hpp:1362
constexpr bool crosses(const OtherLine &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:333
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 const PointType & min() const
Returns the minimum corner (min x, min y).
Definition rectangle.hpp:347
constexpr bool empty() const
Returns whether the rectangle is the empty set of points.
Definition rectangle.hpp:290
constexpr const PointType & max() const
Returns the maximum corner (max x, max y).
Definition rectangle.hpp:359
constexpr bool crosses(const OtherRectangle &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:384
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition rectangle.hpp:867
Unoriented closed segment between two endpoints plus optional segment label.
Definition segment.hpp:58
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:38
constexpr const PointType & max() const
Returns the largest stored endpoint.
Definition segment.hpp:199
constexpr const PointType & min() const
Returns the smallest stored endpoint.
Definition segment.hpp:190
Runtime variant wrapper over the supported primitive shapes.
Definition shape.hpp:160
constexpr const Variant & variant() const
Returns the underlying variant.
Definition shape.hpp:264
constexpr bool crosses(const OtherSegment &other) const
Tests whether the two shapes mutually separate each other (each disconnects the other).
Definition crosses.hpp:105
constexpr bool separates(const EmptyShape< EmptyPoint > &) const
Tests whether removing this shape disconnects the other shape (B∖A is disconnected).
Definition triangle.hpp:811