22template <
class Number,
class Label>
23template<Po
intConcept OtherPo
int>
28template <
class Number,
class Label>
29template<SegmentConcept OtherSegment>
34template <
class Number,
class Label>
35template<OrientedSegmentConcept OtherOrientedSegment>
40template <
class Number,
class Label>
41template<LineConcept OtherLine>
46template <
class Number,
class Label>
47template<OrientedLineConcept OtherOrientedLine>
52template <
class Number,
class Label>
53template<RayConcept OtherRay>
58template <
class Number,
class Label>
59template<HalfplaneConcept OtherHalfplane>
64template <
class Number,
class Label>
65template<RectangleConcept OtherRectangle>
75template <
class Number,
class Label>
76template<TriangleConcept OtherTriangle>
81template <
class Number,
class Label>
82template<ConvexConcept OtherConvex>
87template <
class Number,
class Label>
88template<PolygonConcept OtherPolygon>
93template <
class Number,
class Label>
94template<DiskConcept OtherDisk>
98 return other.a() == other.b() && other.b() == other.c() &&
contains(other.a());
108template <
class Po
intType,
class LabelType>
109template<Po
intConcept OtherPo
int>
114template <
class Po
intType,
class LabelType>
115template<SegmentConcept OtherSegment>
120template <
class Po
intType,
class LabelType>
121template<OrientedSegmentConcept OtherOrientedSegment>
126template <
class Po
intType,
class LabelType>
127template<TriangleConcept OtherTriangle>
132template <
class Po
intType,
class LabelType>
133template<Po
intConcept OtherPo
int>
136 [
this](
const auto& value) {
148template <
class Po
intType,
class LabelType>
149template<Po
intConcept OtherPo
int>
154template <
class Po
intType,
class LabelType>
155template<SegmentConcept OtherSegment>
160template <
class Po
intType,
class LabelType>
161template<OrientedSegmentConcept OtherOrientedSegment>
166template <
class Po
intType,
class LabelType>
167template<LineConcept OtherLine>
172template <
class Po
intType,
class LabelType>
173template<OrientedLineConcept OtherOrientedLine>
178template <
class Po
intType,
class LabelType>
179template<RayConcept OtherRay>
184template <
class Po
intType,
class LabelType>
185template<HalfplaneConcept OtherHalfplane>
190template <
class Po
intType,
class LabelType>
191template<RectangleConcept OtherRectangle>
198 const auto vertices = other.vertices();
207template <
class Po
intType,
class LabelType>
208template<TriangleConcept OtherTriangle>
213template <
class Po
intType,
class LabelType>
214template<ConvexConcept OtherConvex>
216 if (other.size() == 0) {
224 for (std::size_t i = 0; i < other.size(); ++i) {
238template <
class Po
intType,
class LabelType>
239template<Po
intConcept OtherPo
int>
244template <
class Po
intType,
class LabelType>
245template<SegmentConcept OtherSegment>
250template <
class Po
intType,
class LabelType>
251template<OrientedSegmentConcept OtherOrientedSegment>
256template <
class Po
intType,
class LabelType>
257template<LineConcept OtherLine>
262template <
class Po
intType,
class LabelType>
263template<OrientedLineConcept OtherOrientedLine>
268template <
class Po
intType,
class LabelType>
269template<RayConcept OtherRay>
274template <
class Po
intType,
class LabelType>
275template<HalfplaneConcept OtherHalfplane>
280template <
class Po
intType,
class LabelType>
281template<RectangleConcept OtherRectangle>
292template <
class Po
intType,
class LabelType>
293template<TriangleConcept OtherTriangle>
298template <
class Po
intType,
class LabelType>
299template<ConvexConcept OtherConvex>
304 if (other.size() > 2) {
307 for (std::size_t i = 0; i < other.size(); ++i) {
321template <
class Po
intType,
class LabelType>
322template<Po
intConcept OtherPo
int>
327template <
class Po
intType,
class LabelType>
328template<LineConcept OtherLine>
333template <
class Po
intType,
class LabelType>
334template<SegmentConcept OtherSegment>
339template <
class Po
intType,
class LabelType>
340template<OrientedSegmentConcept OtherOrientedSegment>
345template <
class Po
intType,
class LabelType>
346template<OrientedLineConcept OtherOrientedLine>
351template <
class Po
intType,
class LabelType>
352template<RayConcept OtherRay>
357template <
class Po
intType,
class LabelType>
358template<HalfplaneConcept OtherHalfplane>
363template <
class Po
intType,
class LabelType>
364template<RectangleConcept OtherRectangle>
374template <
class Po
intType,
class LabelType>
375template<TriangleConcept OtherTriangle>
380template <
class Po
intType,
class LabelType>
381template<ConvexConcept OtherConvex>
393template <
class Po
intType,
class LabelType>
394template<Po
intConcept OtherPo
int>
399template <
class Po
intType,
class LabelType>
400template<LineConcept OtherLine>
405template <
class Po
intType,
class LabelType>
406template<OrientedLineConcept OtherOrientedLine>
411template <
class Po
intType,
class LabelType>
412template<SegmentConcept OtherSegment>
417template <
class Po
intType,
class LabelType>
418template<OrientedSegmentConcept OtherOrientedSegment>
423template <
class Po
intType,
class LabelType>
424template<RayConcept OtherRay>
429template <
class Po
intType,
class LabelType>
430template<HalfplaneConcept OtherHalfplane>
435template <
class Po
intType,
class LabelType>
436template<RectangleConcept OtherRectangle>
446template <
class Po
intType,
class LabelType>
447template<TriangleConcept OtherTriangle>
452template <
class Po
intType,
class LabelType>
453template<ConvexConcept OtherConvex>
465template <
class Po
intType,
class LabelType>
466template<Po
intConcept OtherPo
int>
471template <
class Po
intType,
class LabelType>
472template<LineConcept OtherLine>
477template <
class Po
intType,
class LabelType>
478template<OrientedLineConcept OtherOrientedLine>
483template <
class Po
intType,
class LabelType>
484template<SegmentConcept OtherSegment>
489template <
class Po
intType,
class LabelType>
490template<OrientedSegmentConcept OtherOrientedSegment>
495template <
class Po
intType,
class LabelType>
496template<RayConcept OtherRay>
501template <
class Po
intType,
class LabelType>
502template<HalfplaneConcept OtherHalfplane>
507template <
class Po
intType,
class LabelType>
508template<RectangleConcept OtherRectangle>
519template <
class Po
intType,
class LabelType>
520template<TriangleConcept OtherTriangle>
527template <
class Po
intType,
class LabelType>
528template<ConvexConcept OtherConvex>
533 if (other.size() > 2) {
536 for (std::size_t i = 0; i < other.size(); ++i) {
551template <
class Po
intType,
class LabelType>
552template<Po
intConcept OtherPo
int>
559template <
class Po
intType,
class LabelType>
560template<LineConcept OtherLine>
564 return detail::coversNoPoint(other);
569template <
class Po
intType,
class LabelType>
570template<OrientedLineConcept OtherOrientedLine>
574 return detail::coversNoPoint(other);
579template <
class Po
intType,
class LabelType>
580template<SegmentConcept OtherSegment>
584 return detail::coversNoPoint(other);
589template <
class Po
intType,
class LabelType>
590template<OrientedSegmentConcept OtherOrientedSegment>
594 return detail::coversNoPoint(other);
599template <
class Po
intType,
class LabelType>
600template<RayConcept OtherRay>
604 return detail::coversNoPoint(other);
609template <
class Po
intType,
class LabelType>
610template<HalfplaneConcept OtherHalfplane>
614 return detail::coversNoPoint(other);
619template <
class Po
intType,
class LabelType>
620template<RectangleConcept OtherRectangle>
631template <
class Po
intType,
class LabelType>
632template<TriangleConcept OtherTriangle>
636 return detail::coversNoPoint(other);
641template <
class Po
intType,
class LabelType>
642template<ConvexConcept OtherConvex>
646 return detail::coversNoPoint(other);
659template <
class Po
intType,
class LabelType>
660template<Po
intConcept OtherPo
int>
665template <
class Po
intType,
class LabelType>
666template<LineConcept OtherLine>
677template <
class Po
intType,
class LabelType>
678template<OrientedLineConcept OtherOrientedLine>
687template <
class Po
intType,
class LabelType>
688template<SegmentConcept OtherSegment>
696template <
class Po
intType,
class LabelType>
697template<OrientedSegmentConcept OtherOrientedSegment>
705template <
class Po
intType,
class LabelType>
706template<RayConcept OtherRay>
715template <
class Po
intType,
class LabelType>
716template<RectangleConcept OtherRectangle>
726 const auto vertices = other.vertices();
727 for (
const auto&
vertex : vertices) {
735template <
class Po
intType,
class LabelType>
736template<ConvexConcept OtherConvex>
738 if (other.size() == 0) {
745template <
class Po
intType,
class LabelType>
746template<DiskConcept OtherDisk>
748 if (
const auto center = other.getIfPoint()) {
760 return !
asLine().intersects(other) && other.pointInsideInteriorContainedIn(*
this);
763template <
class Po
intType,
class LabelType>
764template<HalfplaneConcept OtherHalfplane>
772 if (!
asLine().parallel(other.asLine()) ||
774 std::partial_ordering::greater) {
780template <
class Po
intType,
class LabelType>
781template<TriangleConcept OtherTriangle>
790template <
class Po
intType,
class LabelType>
791template<Po
intConcept OtherPo
int>
801template <
class Po
intType,
class LabelType>
802template<SegmentConcept OtherSegment>
807template <
class Po
intType,
class LabelType>
808template<OrientedSegmentConcept OtherOrientedSegment>
813template <
class Po
intType,
class LabelType>
814template<LineConcept OtherLine>
819template <
class Po
intType,
class LabelType>
820template<OrientedLineConcept OtherOrientedLine>
825template <
class Po
intType,
class LabelType>
826template<RayConcept OtherRay>
831template <
class Po
intType,
class LabelType>
832template<HalfplaneConcept OtherHalfplane>
837template <
class Po
intType,
class LabelType>
838template<RectangleConcept OtherRectangle>
848 for (
size_t i = 0; i < 4; ++i) {
856template <
class Po
intType,
class LabelType>
857template<TriangleConcept OtherTriangle>
862 for (
size_t i = 0; i < 3; ++i) {
870template <
class Po
intType,
class LabelType>
871template<ConvexConcept OtherConvex>
876 if (other.size() == 0) {
882 if (other.size() == 1) {
885 if (other.size() == 2) {
889 if (other.size() <= 2*
size()) {
890 for (
size_t i = 0; i < other.size(); ++i) {
897 if (!
edge.leftHalfplane().interiorContains(other)) {
905template <
class Po
intType,
class LabelType>
906template<DiskConcept OtherDisk>
909 if (!
edge.leftHalfplane().interiorContains(other)) {
916template <
class Po
intType,
class LabelType>
917template <Po
intConcept OtherPo
int>
920 [
this](
const auto& value) {
929template <
class Po
intType,
class LabelType>
930template<Po
intConcept OtherPo
int>
938template <
class Po
intType,
class LabelType>
939template<SegmentConcept OtherSegment>
951 if (other.intersects(
edge)) {
958template <
class Po
intType,
class LabelType>
959template<SegmentConcept OtherSegment>
967 if (other.isDegenerate()) {
977 if (
edge.interiorsIntersect(other) || other.interiorContains(
edge.min())) {
984template <
class Po
intType,
class LabelType>
985template<OrientedSegmentConcept OtherOrientedSegment>
990template <
class Po
intType,
class LabelType>
991template<LineConcept OtherLine>
996template <
class Po
intType,
class LabelType>
997template<OrientedLineConcept OtherOrientedLine>
1002template <
class Po
intType,
class LabelType>
1003template<RayConcept OtherRay>
1008template <
class Po
intType,
class LabelType>
1009template<HalfplaneConcept OtherHalfplane>
1016template <
class Po
intType,
class LabelType>
1017template<RectangleConcept OtherRectangle>
1019 if (other.empty()) {
1024 for (std::size_t i = 0; i < other.size(); ++i) {
1032template <
class Po
intType,
class LabelType>
1033template<TriangleConcept OtherTriangle>
1035 for (std::size_t i = 0; i < other.size(); ++i) {
1048template <
class Po
intType,
class LabelType>
1049template<ConvexConcept OtherConvex>
1051 using OtherPoint =
typename OtherConvex::PointType;
1052 if (other.size() == 0) {
1058 if (other.size() == 1) {
1069 BoundaryChains<Polygon> mine(*
this);
1070 while (!mine.exhausted()) {
1071 const auto& chain = mine.produceNext();
1073 if (chain.intersects(*their)) {
1082template <
class Po
intType,
class LabelType>
1083template<PolygonConcept OtherPolygon>
1085 if (other.size() == 0) {
1091 if (other.size() == 1) {
1105template <
class Po
intType,
class LabelType>
1106template<Po
intConcept OtherPo
int>
1108 return inCircleSign(
a(),
b(),
c(), point) == std::partial_ordering::greater;
1111template <
class Po
intType,
class LabelType>
1112template<SegmentConcept OtherSegment>
1117template <
class Po
intType,
class LabelType>
1118template<OrientedSegmentConcept OtherOrientedSegment>
1123template <
class Po
intType,
class LabelType>
1124template<LineConcept OtherLine>
1129template <
class Po
intType,
class LabelType>
1130template<OrientedLineConcept OtherOrientedLine>
1135template <
class Po
intType,
class LabelType>
1136template<RayConcept OtherRay>
1141template <
class Po
intType,
class LabelType>
1142template<HalfplaneConcept OtherHalfplane>
1147template <
class Po
intType,
class LabelType>
1148template<TriangleConcept OtherTriangle>
1153template <
class Po
intType,
class LabelType>
1154template<RectangleConcept OtherRectangle>
1156 if (other.empty()) {
1161 const auto vertices = other.vertices();
1166template <
class Po
intType,
class LabelType>
1167template<ConvexConcept OtherConvex>
1169 for (
const auto& point : other) {
1177template <
class Po
intType,
class LabelType>
1178template<DiskConcept OtherDisk>
1183 using R = std::conditional_t<
1184 std::is_floating_point_v<NumberType> ||
1185 std::is_floating_point_v<typename OtherDisk::NumberType>,
1191 if (r1_sq <= r2_sq) {
1196 const R A = d2 - r1_sq - r2_sq;
1197 return A < R{} && A * A > R{4} * r1_sq * r2_sq;
1200template <
class Po
intType,
class LabelType>
1201template<PolygonConcept OtherPolygon>
1206 for (
const auto&
vertex : other) {
1224template <
class Po
intType,
class LabelType>
1225template<DiskConcept OtherDisk>
1227 return asSegment().interiorContains(other);
1230template <
class Po
intType,
class LabelType>
1231template<PolygonConcept OtherPolygon>
1233 return asSegment().interiorContains(other);
1236template <
class Po
intType,
class LabelType>
1237template<DiskConcept OtherDisk>
1241 return other.a() == other.b() && other.b() == other.c() &&
contains(other.a());
1244template <
class Po
intType,
class LabelType>
1245template<PolygonConcept OtherPolygon>
1251template <
class Po
intType,
class LabelType>
1252template<DiskConcept OtherDisk>
1254 return asLine().interiorContains(other);
1257template <
class Po
intType,
class LabelType>
1258template<PolygonConcept OtherPolygon>
1260 return asLine().interiorContains(other);
1263template <
class Po
intType,
class LabelType>
1264template<DiskConcept OtherDisk>
1268 return other.a() == other.b() && other.b() == other.c() &&
interiorContains(other.a());
1271template <
class Po
intType,
class LabelType>
1272template<PolygonConcept OtherPolygon>
1276 for (
const auto&
vertex : other) {
1284template <
class Po
intType,
class LabelType>
1285template<PolygonConcept OtherPolygon>
1292 for (
const auto&
vertex : other) {
1300template <
class Po
intType,
class LabelType>
1301template<DiskConcept OtherDisk>
1305 return detail::coversNoPoint(other);
1307 return asConvex().interiorContains(other);
1310template <
class Po
intType,
class LabelType>
1311template<PolygonConcept OtherPolygon>
1315 return detail::coversNoPoint(other);
1317 return asConvex().interiorContains(other);
1320template <
class Po
intType,
class LabelType>
1321template<DiskConcept OtherDisk>
1323 return asConvex().interiorContains(other);
1326template <
class Po
intType,
class LabelType>
1327template<PolygonConcept OtherPolygon>
1329 return asConvex().interiorContains(other);
1332template <
class Po
intType,
class LabelType>
1333template<PolygonConcept OtherPolygon>
1337 for (
const auto&
vertex : other) {
1345template <
class Po
intType,
class LabelType>
1346template<DiskConcept OtherDisk>
1348 if (other.isDegenerate()) {
1356 if (other.intersects(
edge)) {
1369template <
class Po
intType,
class LabelType,
class Storage>
1370template<Po
intConcept OtherPo
int>
1375template <
class Po
intType,
class LabelType,
class Storage>
1376template<SegmentConcept OtherSegment>
1384template <
class Po
intType,
class LabelType,
class Storage>
1385template<OrientedSegmentConcept OtherOrientedSegment>
1390template <
class Po
intType,
class LabelType,
class Storage>
1391template<LineConcept OtherLine>
1396template <
class Po
intType,
class LabelType,
class Storage>
1397template<OrientedLineConcept OtherOrientedLine>
1402template <
class Po
intType,
class LabelType,
class Storage>
1403template<RayConcept OtherRay>
1408template <
class Po
intType,
class LabelType,
class Storage>
1409template<HalfplaneConcept OtherHalfplane>
1414template <
class Po
intType,
class LabelType,
class Storage>
1415template<TriangleConcept OtherTriangle>
1417 if (!other.isDegenerate()) {
1420 if (other.a() == other.c()) {
1426template <
class Po
intType,
class LabelType,
class Storage>
1427template<MonotoneChainConcept OtherChain>
1429 if (other.empty()) {
1438template <
class Po
intType,
class LabelType,
class Storage>
1439template<Po
intConcept OtherPo
int>
1442 [
this](
const auto& value) {
1448template <
class Number,
class Label>
1449template<MonotoneChainConcept OtherChain>
1457template <
class Po
intType,
class LabelType>
1458template<MonotoneChainConcept OtherChain>
1460 for (
const auto&
vertex : other) {
1468template <
class Po
intType,
class LabelType>
1469template<MonotoneChainConcept OtherChain>
1471 return asSegment().interiorContains(other);
1474template <
class Po
intType,
class LabelType>
1475template<MonotoneChainConcept OtherChain>
1480template <
class Po
intType,
class LabelType>
1481template<MonotoneChainConcept OtherChain>
1483 return asLine().interiorContains(other);
1486template <
class Po
intType,
class LabelType>
1487template<MonotoneChainConcept OtherChain>
1489 for (
const auto&
vertex : other) {
1497template <
class Po
intType,
class LabelType>
1498template<MonotoneChainConcept OtherChain>
1503 for (
const auto&
vertex : other) {
1511template <
class Po
intType,
class LabelType>
1512template<MonotoneChainConcept OtherChain>
1516 return detail::coversNoPoint(other);
1518 return asConvex().interiorContains(other);
1521template <
class Po
intType,
class LabelType>
1522template<MonotoneChainConcept OtherChain>
1524 return asConvex().interiorContains(other);
1527template <
class Po
intType,
class LabelType>
1528template<MonotoneChainConcept OtherChain>
1530 for (
const auto&
vertex : other) {
1538template <
class Po
intType,
class LabelType>
1539template<MonotoneChainConcept OtherChain>
1544 for (
const auto&
vertex : other) {
1554template <
class Po
intType,
class LabelType>
1555template<MonotoneChainConcept OtherChain>
1557 if (other.empty()) {
1560 if (other.size() == 1) {
1563 for (std::size_t i = 0; i + 1 < other.size(); ++i) {
1579template <
class Po
intType,
class LabelType>
1580template<Po
intConcept OtherPo
int>
1585template <
class Po
intType,
class LabelType>
1586template<SegmentConcept OtherSegment>
1592 return contains(other) && !other.contains((*
this)[0]) &&
1593 !other.contains((*
this)[
size() - 1]);
1596template <
class Po
intType,
class LabelType>
1597template<OrientedSegmentConcept OtherOrientedSegment>
1602template <
class Po
intType,
class LabelType>
1603template<LineConcept OtherLine>
1608template <
class Po
intType,
class LabelType>
1609template<OrientedLineConcept OtherOrientedLine>
1614template <
class Po
intType,
class LabelType>
1615template<RayConcept OtherRay>
1620template <
class Po
intType,
class LabelType>
1621template<HalfplaneConcept OtherHalfplane>
1626template <
class Po
intType,
class LabelType>
1627template<TriangleConcept OtherTriangle>
1629 if (!other.isDegenerate()) {
1632 if (other.a() == other.c()) {
1638template <
class Po
intType,
class LabelType>
1639template<MonotoneChainConcept OtherChain>
1641 if (other.empty()) {
1646 return contains(other) && !other.contains((*
this)[0]) &&
1647 !other.contains((*
this)[
size() - 1]);
1650template <
class Po
intType,
class LabelType>
1651template<PolylineConcept OtherPolyline>
1653 if (other.empty()) {
1658 return contains(other) && !other.contains((*
this)[0]) &&
1659 !other.contains((*
this)[
size() - 1]);
1662template <
class Po
intType,
class LabelType>
1663template<Po
intConcept OtherPo
int>
1666 [
this](
const auto& value) {
1672template <
class Number,
class Label>
1673template<PolylineConcept OtherPolyline>
1680template <
class Po
intType,
class LabelType>
1681template<PolylineConcept OtherPolyline>
1683 for (
const auto&
vertex : other) {
1691template <
class Po
intType,
class LabelType>
1692template<PolylineConcept OtherPolyline>
1694 return asSegment().interiorContains(other);
1697template <
class Po
intType,
class LabelType>
1698template<PolylineConcept OtherPolyline>
1703template <
class Po
intType,
class LabelType>
1704template<PolylineConcept OtherPolyline>
1706 return asLine().interiorContains(other);
1712template <
class Po
intType,
class LabelType>
1713template<PolylineConcept OtherPolyline>
1715 for (
const auto&
vertex : other) {
1723template <
class Po
intType,
class LabelType>
1724template<PolylineConcept OtherPolyline>
1729 for (
const auto&
vertex : other) {
1737template <
class Po
intType,
class LabelType>
1738template<PolylineConcept OtherPolyline>
1742 return detail::coversNoPoint(other);
1744 return asConvex().interiorContains(other);
1747template <
class Po
intType,
class LabelType>
1748template<PolylineConcept OtherPolyline>
1750 return asConvex().interiorContains(other);
1753template <
class Po
intType,
class LabelType>
1754template<PolylineConcept OtherPolyline>
1756 for (
const auto&
vertex : other) {
1764template <
class Po
intType,
class LabelType>
1765template<PolylineConcept OtherPolyline>
1770 for (
const auto&
vertex : other) {
1781template <
class Po
intType,
class LabelType,
class Storage>
1782template<PolylineConcept OtherPolyline>
1784 if (other.empty()) {
1787 return contains(other) && !other.contains((*
this)[0]) &&
1788 !other.contains((*
this)[
size() - 1]);
1793template <
class Po
intType,
class LabelType>
1794template<PolylineConcept OtherPolyline>
1796 if (other.empty()) {
1799 if (other.size() == 1) {
1802 for (std::size_t i = 0; i + 1 < other.size(); ++i) {
1814template <
class Po
intType,
class LabelType>
1815template <Po
intConcept OtherPo
int>
1819 return pointStatus(point) > 0;
1822template <
class Po
intType,
class LabelType>
1823template <SegmentConcept OtherSegment>
1830template <
class Po
intType,
class LabelType>
1831template <OrientedSegmentConcept OtherOrientedSegment>
1836template <
class Po
intType,
class LabelType>
1837template <LineConcept OtherLine>
1844 for (
const auto& halfplane : halfplanes_) {
1845 if (!halfplane.interiorContains(other)) {
1852template <
class Po
intType,
class LabelType>
1853template <OrientedLineConcept OtherOrientedLine>
1858template <
class Po
intType,
class LabelType>
1859template <RayConcept OtherRay>
1872 return recessionContains(forward);
1875template <
class Po
intType,
class LabelType>
1876template <HalfplaneConcept OtherHalfplane>
1883 return halfplanes_.empty() || halfplanes_[0].interiorContains(other);
1886template <
class Po
intType,
class LabelType>
1887template <RectangleConcept OtherRectangle>
1889 if (other.empty()) {
1896 const auto vertices = other.vertices();
1905template <
class Po
intType,
class LabelType>
1906template <TriangleConcept OtherTriangle>
1911template <
class Po
intType,
class LabelType>
1912template <DiskConcept OtherDisk>
1919 for (
const auto& halfplane : halfplanes_) {
1920 if (!halfplane.interiorContains(other)) {
1927template <
class Po
intType,
class LabelType>
1928template <ConvexConcept OtherConvex>
1930 for (std::size_t i = 0; i < other.size(); ++i) {
1938template <
class Po
intType,
class LabelType>
1939template <MonotoneChainConcept OtherChain>
1941 for (std::size_t i = 0; i < other.size(); ++i) {
1949template <
class Po
intType,
class LabelType>
1950template <PolylineConcept OtherPolyline>
1952 for (std::size_t i = 0; i < other.size(); ++i) {
1960template <
class Po
intType,
class LabelType>
1961template <PolygonConcept OtherPolygon>
1965 for (std::size_t i = 0; i < other.size(); ++i) {
1973template <
class Po
intType,
class LabelType>
1974template <HalfplaneIntersectionConcept OtherRegion>
1981 if (other.empty()) {
1987 for (
const auto& halfplane : halfplanes_) {
1988 if (!halfplane.interiorContains(other)) {
1995template <
class Po
intType,
class LabelType>
1996template <Po
intConcept OtherPo
int>
1999 [
this](
const auto& value) {
2020template <
class Shape2,
class Region>
2021constexpr bool interiorContainsDegenerateRegion(
const Shape2& shape,
const Region& region) {
2023 [&shape](
const auto& carrier) {
2024 if constexpr (
requires { shape.interiorContains(carrier); }) {
2025 return shape.interiorContains(carrier);
2031 degenerateRegionCarrier(region));
2036template <
class Number,
class Label>
2037template <HalfplaneIntersectionConcept OtherRegion>
2043template <
class Po
intType,
class LabelType>
2044template <HalfplaneIntersectionConcept OtherRegion>
2046 if (other.empty()) {
2049 if (!other.isDegenerate()) {
2052 return detail::interiorContainsDegenerateRegion(*
this, other);
2055template <
class Po
intType,
class LabelType>
2056template <HalfplaneIntersectionConcept OtherRegion>
2058 return asSegment().interiorContains(other);
2061template <
class Po
intType,
class LabelType>
2062template <HalfplaneIntersectionConcept OtherRegion>
2068template <
class Po
intType,
class LabelType>
2069template <HalfplaneIntersectionConcept OtherRegion>
2071 return asLine().interiorContains(other);
2074template <
class Po
intType,
class LabelType>
2075template <HalfplaneIntersectionConcept OtherRegion>
2077 if (other.empty()) {
2080 if (!other.isDegenerate()) {
2083 return detail::interiorContainsDegenerateRegion(*
this, other);
2086template <
class Po
intType,
class LabelType>
2087template <HalfplaneIntersectionConcept OtherRegion>
2089 return detail::regionInsideHalfplaneInterior(other, *
this);
2092template <
class Po
intType,
class LabelType>
2093template <HalfplaneIntersectionConcept OtherRegion>
2097 return detail::coversNoPoint(other);
2099 if (other.empty()) {
2115template <
class Po
intType,
class LabelType>
2116template <HalfplaneIntersectionConcept OtherRegion>
2118 if (other.empty()) {
2129template <
class Po
intType,
class LabelType>
2130template <HalfplaneIntersectionConcept OtherRegion>
2132 if (other.empty()) {
2140 using E = detail::region_exact_number_t<typename OtherRegion::NumberType>;
2141 const auto vertices = other.template vertices<E>();
2142 for (
const auto&
vertex : vertices) {
2150template <
class Po
intType,
class LabelType>
2151template <HalfplaneIntersectionConcept OtherRegion>
2153 if (other.empty()) {
2159 for (std::size_t i = 0; i <
size(); ++i) {
2160 if (!detail::regionInsideHalfplaneInterior(
2168template <
class Po
intType,
class LabelType,
class Storage>
2169template <HalfplaneIntersectionConcept OtherRegion>
2171 if (other.empty()) {
2174 if (!other.isDegenerate()) {
2177 return detail::interiorContainsDegenerateRegion(*
this, other);
2180template <
class Po
intType,
class LabelType>
2181template <HalfplaneIntersectionConcept OtherRegion>
2183 if (other.empty()) {
2186 if (!other.isDegenerate()) {
2189 return detail::interiorContainsDegenerateRegion(*
this, other);
2192template <
class Po
intType,
class LabelType>
2193template <HalfplaneIntersectionConcept OtherRegion>
2195 if (other.empty()) {
2198 if (!other.isBounded()) {
2201 using E = detail::region_exact_number_t<typename OtherRegion::NumberType>;
2202 if (other.isDegenerate()) {
2204 [
this](
const auto& carrier) {
2212 detail::degenerateRegionCarrier(other));
2221template <
class Po
intType,
class LabelType>
2222template <Po
intConcept OtherPo
int>
2224 if (!outer_.interiorContains(point)) {
2229 for (
const auto&
hole : holes_) {
2230 if (
hole.contains(point)) {
2237template <
class Po
intType,
class LabelType>
2238template <SegmentConcept OtherSegment>
2240 if (other.isDegenerate()) {
2243 if (!outer_.interiorContains(other)) {
2248 for (
const auto&
hole : holes_) {
2249 if (
hole.intersects(other)) {
2256template <
class Po
intType,
class LabelType>
2257template <SegmentConcept OtherSegment>
2262 if (other.isDegenerate()) {
2265 if (!outer_.interiorContainsInterior(other)) {
2268 for (
const auto&
hole : holes_) {
2269 for (
const auto&
edge :
hole.edgesView()) {
2270 if (
edge.interiorsIntersect(other) || other.interiorContains(
edge.min())) {
2278template <
class Po
intType,
class LabelType>
2279template <OrientedSegmentConcept OtherOrientedSegment>
2285template <
class Po
intType,
class LabelType>
2286template <LineConcept OtherLine>
2291template <
class Po
intType,
class LabelType>
2292template <OrientedLineConcept OtherOrientedLine>
2297template <
class Po
intType,
class LabelType>
2298template <RayConcept OtherRay>
2303template <
class Po
intType,
class LabelType>
2304template <HalfplaneConcept OtherHalfplane>
2313template <
class Po
intType,
class LabelType>
2314template <
class OtherArea>
2315constexpr bool PolygonWithHoles<PointType, LabelType>::outerInteriorContains(
const OtherArea& other)
const {
2317 for (
const auto&
edge : other.edges()) {
2318 if (!outer_.interiorContains(
edge)) {
2324 return outer_.interiorContains(other);
2333template <
class Po
intType,
class LabelType>
2334template <
class OtherArea>
2335constexpr bool PolygonWithHoles<PointType, LabelType>::areaInteriorContains(
const OtherArea& other)
const {
2336 if (!outerInteriorContains(other)) {
2339 for (
const auto& hole : holes_) {
2340 if (other.intersects(hole)) {
2347template <
class Po
intType,
class LabelType>
2348template <RectangleConcept OtherRectangle>
2350 if (other.empty()) {
2355 return areaInteriorContains(other);
2358template <
class Po
intType,
class LabelType>
2359template <TriangleConcept OtherTriangle>
2361 return areaInteriorContains(other);
2364template <
class Po
intType,
class LabelType>
2365template <ConvexConcept OtherConvex>
2367 return areaInteriorContains(other);
2370template <
class Po
intType,
class LabelType>
2371template <PolygonConcept OtherPolygon>
2373 return areaInteriorContains(other);
2376template <
class Po
intType,
class LabelType>
2377template <PolygonWithHolesConcept OtherRegion>
2379 return areaInteriorContains(other);
2384template <
class Po
intType,
class LabelType>
2385template <MonotoneChainConcept OtherChain>
2387 return chainRelation(other,
true,
2391template <
class Po
intType,
class LabelType>
2392template <PolylineConcept OtherPolyline>
2394 return chainRelation(other,
true,
2401template <
class Po
intType,
class LabelType>
2402template <DiskConcept OtherDisk>
2404 if (other.isDegenerate()) {
2407 if (!outer_.interiorContains(other)) {
2410 for (
const auto&
hole : holes_) {
2411 if (other.intersects(
hole)) {
2418template <
class Po
intType,
class LabelType>
2419template <HalfplaneIntersectionConcept OtherIntersection>
2421 if (other.empty()) {
2424 if (other.isDegenerate()) {
2425 return degenerateIntersectionRelation(
2426 other, [
this](
const auto& carrier) {
return this->
interiorContains(carrier); });
2428 if (!other.isBounded()) {
2431 return areaInteriorContains(asConvexOperand(other));
2456template <
class Number,
class Label>
2457template <PolygonWithHolesConcept OtherRegion>
2460 return contains(other);
2463template <
class Po
intType,
class LabelType>
2464template <PolygonWithHolesConcept OtherRegion>
2466 return interiorContains(other.outer());
2469template <
class Po
intType,
class LabelType>
2470template <PolygonWithHolesConcept OtherRegion>
2472 return asSegment().interiorContains(other);
2475template <
class Po
intType,
class LabelType>
2476template <PolygonWithHolesConcept OtherRegion>
2479 return contains(other);
2482template <
class Po
intType,
class LabelType>
2483template <PolygonWithHolesConcept OtherRegion>
2485 return asLine().interiorContains(other);
2488template <
class Po
intType,
class LabelType>
2489template <PolygonWithHolesConcept OtherRegion>
2491 return interiorContains(other.outer());
2494template <
class Po
intType,
class LabelType>
2495template <PolygonWithHolesConcept OtherRegion>
2497 return interiorContains(other.outer());
2500template <
class Po
intType,
class LabelType>
2501template <PolygonWithHolesConcept OtherRegion>
2505 return detail::coversNoPoint(other);
2507 return interiorContains(other.outer());
2510template <
class Po
intType,
class LabelType>
2511template <PolygonWithHolesConcept OtherRegion>
2513 return interiorContains(other.outer());
2516template <
class Po
intType,
class LabelType>
2517template <PolygonWithHolesConcept OtherRegion>
2519 return interiorContains(other.outer());
2522template <
class Po
intType,
class LabelType>
2523template <PolygonWithHolesConcept OtherRegion>
2525 return interiorContains(other.outer());
2528template <
class Po
intType,
class LabelType,
class Storage>
2529template <PolygonWithHolesConcept OtherRegion>
2531 return interiorContains(other.outer());
2535template <
class Po
intType,
class LabelType>
2536template <PolygonWithHolesConcept OtherRegion>
2538 if (!other.isDegenerate()) {
2541 return detail::everyHoledRegionEdge(
2542 other, [
this](
const auto&
edge) {
return this->interiorContains(
edge); });
2545template <
class Po
intType,
class LabelType>
2546template <PolygonWithHolesConcept OtherRegion>
2548 return interiorContains(other.outer());
2551template <
class Po
intType,
class LabelType>
2552template <PolygonWithHolesConcept OtherHoledRegion>
2561template <
class Po
intType,
class LabelType>
2562template <Po
intConcept OtherPo
int>
2565 [
this](
const auto& value) {
2581template <
class Po
intType,
class LabelType>
2582template <detail::SetOperandConcept OtherShape>
2585 return component.interiorContains(other);
2589template <
class Po
intType,
class LabelType>
2590template <SegmentConcept OtherSegment>
2593 return component.interiorContainsInterior(other);
2597template <
class Po
intType,
class LabelType>
2598template <PolygonSetConcept OtherSet>
2608template <
class Po
intType,
class LabelType>
2609template <Po
intConcept OtherPo
int>
2611 return std::visit([
this](
const auto& value) {
return this->
interiorContains(value); },
Exact rational number class template.
Definition rational.hpp:106
Definition forward.hpp:317
Implementations of the 'crosses' predicate.
Definition arrangement.hpp:67
constexpr std::partial_ordering inCircleSign(const Point< ANumber, ALabel > &a, const Point< BNumber, BLabel > &b, const Point< CNumber, CLabel > &c, const Point< DNumber, DLabel > &d)
Classifies a point with respect to the circumcircle of three others.
Definition orientation.hpp:894
@ edge
Definition bitmatrix.hpp:37
@ vertex
Definition bitmatrix.hpp:37
constexpr std::partial_ordering dotSign(const Point< ANumber, ALabel > &a, const Point< BNumber, BLabel > &b)
Tells if the angle between two vectors is acute, right, or obtuse.
Definition orientation.hpp:688
constexpr std::partial_ordering orientationSign(const Point< ANumber, ALabel > &a, const Point< BNumber, BLabel > &b, const Point< CNumber, CLabel > &c)
Classifies the orientation of three points.
Definition orientation.hpp:544
constexpr std::partial_ordering crossSign(const Point< UNumber, ULabel > &u, const Point< VNumber, VLabel > &v)
Classifies the turn from one vector to another.
Definition orientation.hpp:583
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 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 convex.hpp:289
constexpr bool isDegenerate() const
Checks if the convex polygon is degenerate (has zero area).
Definition predicates.hpp:982
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition convex.hpp:1340
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1135
constexpr auto orientedEdgesView() const
Lazy view counterpart of orientedEdges(); see edgesView().
Definition convex.hpp:583
size_t size() const
Returns the number of vertices in the convex polygon.
Definition convex.hpp:840
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:652
constexpr ResultNumber squaredRadius() const
Returns the squared radius in an explicitly chosen result type.
Definition disk.hpp:402
constexpr Point< ResultNumber, PointLabelType > center() const
Returns the center (circumcenter of the three boundary points) in an explicitly chosen coordinate typ...
Definition disk.hpp:284
constexpr bool isDegenerate() const
Returns whether the three boundary points are collinear.
Definition disk.hpp:348
constexpr const PointType & c() const
Returns the third boundary point in canonical order.
Definition disk.hpp:244
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition disk.hpp:909
detail::floating_result_t< ResultNumber > squaredDistance(const OtherPoint &point) const
Returns the squared Euclidean distance from this disk to a point.
Definition distance.hpp:1194
constexpr const PointType & a() const
Returns the first boundary point (lexicographically smallest).
Definition disk.hpp:228
constexpr const PointType & b() const
Returns the second boundary point in canonical order.
Definition disk.hpp:235
constexpr bool empty() const
Returns whether the region is the empty set.
Definition halfplaneintersection.hpp:649
constexpr std::vector< Point< ResultNumber, typename PointType::LabelType > > vertices() const
Returns every vertex of the region, in pair-index order (for a bounded region: counterclockwise).
Definition halfplaneintersection.hpp:890
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1816
constexpr std::size_t size() const
Returns the number of stored (non-redundant) half-planes.
Definition halfplaneintersection.hpp:596
constexpr Point< ResultNumber, typename PointType::LabelType > vertex(std::size_t i) const
Returns the vertex between half-planes i and i+1 (cyclically).
Definition halfplaneintersection.hpp:875
Closed half-plane defined by an oriented boundary line.
Definition halfplane.hpp:51
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition halfplane.hpp:562
constexpr const PointType & target() const
Returns the target boundary point.
Definition halfplane.hpp:193
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:872
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:405
constexpr Line< PointType > asLine() const
Returns the boundary line without orientation.
Definition halfplane.hpp:318
constexpr const PointType & source() const
Returns the source boundary point.
Definition halfplane.hpp:181
constexpr bool isDegenerate() const
Returns whether the defining points coincide.
Definition predicates.hpp:952
Unoriented infinite line.
Definition line.hpp:52
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:428
constexpr bool intersects(const OtherPoint &other) const
Tests whether this shape and the other shape intersect (A ∩ B ≠ ∅).
Definition intersects.hpp:312
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition line.hpp:574
Weakly x-monotone polyline stored by lexicographically sorted vertices.
Definition monotonechain.hpp:146
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1159
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1822
constexpr std::size_t size() const
Returns the number of vertices in the chain.
Definition monotonechain.hpp:393
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1371
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:531
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition orientedline.hpp:683
constexpr Line< PointType > asLine() const
Returns the line without orientation.
Definition orientedline.hpp:321
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:216
constexpr Segment< PointType > asSegment() const
Returns the segment without orientation.
Definition orientedsegment.hpp:322
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:346
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 bool contains(const OtherPoint &other) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:25
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition point.hpp:471
bool interiorContains(const OtherShape &other) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2583
bool interiorContainsInterior(const OtherSegment &other) const
Tests whether this shape's interior contains the segment's interior.
Definition interiorcontains.hpp:2591
constexpr const ComponentType & component(std::size_t index) const
Accesses a component by index.
Definition polygonset.hpp:271
PolygonWithHoles< PointType > ComponentType
Definition polygonset.hpp:169
constexpr bool interiorContainsInterior(const OtherSegment &other) const
Tests whether this shape's interior contains the segment's interior.
Definition interiorcontains.hpp:2258
constexpr const PolygonType & hole(std::size_t index) const
Accesses a hole by index.
Definition polygonwithholes.hpp:196
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:2223
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2945
constexpr const Rectangle< PointType > & bbox() const
Computes the bounding box of the polygon.
Definition bounding.hpp:449
constexpr bool boundaryContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition polygon.hpp:1532
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition polygon.hpp:1537
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:1296
constexpr auto edgesView() const
Returns a lazy view over the edges, materializing each Segment on the fly instead of allocating a vec...
Definition polygon.hpp:782
constexpr bool boundariesIntersect(const OtherPolygon &other) const
Tests whether the two polygon boundaries share at least one point (∂A ∩ ∂B ≠ ∅).
Definition interiorsintersect.hpp:1197
constexpr std::size_t size() const
Returns the number of vertices in the polygon.
Definition polygon.hpp:259
constexpr bool interiorContainsInterior(const OtherSegment &other) const
Tests whether this shape's interior contains the segment's interior.
Definition interiorcontains.hpp:960
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:2134
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1268
constexpr std::size_t size() const
Returns the number of vertices in the polyline.
Definition polyline.hpp:388
constexpr bool interiorContains(const OtherPoint &point) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition interiorcontains.hpp:1581
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 boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:254
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:625
constexpr bool isDegenerate() const
Returns whether the rectangle has empty interior.
Definition predicates.hpp:869
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 bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition rectangle.hpp:862
constexpr Convex< PointType > asConvex() const
Returns the rectangle as a convex polygon.
Definition rectangle.hpp:690
PointType_ PointType
Definition rectangle.hpp:76
constexpr bool boundaryContains(const Shape< PointType > &other) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:1134
constexpr const PointType & max() const
Returns the maximum corner (max x, max y).
Definition rectangle.hpp:359
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:728
Unoriented closed segment between two endpoints plus optional segment label.
Definition segment.hpp:58
constexpr bool contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:119
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:110
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition segment.hpp:736
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 contains(const OtherPoint &point) const
Tests whether this shape contains the other shape (A ⊇ B).
Definition contains.hpp:223
constexpr const PointType & b() const
Returns the second vertex.
Definition triangle.hpp:217
constexpr std::array< PointType, 3 > vertices() const
Returns the vertices in canonical order.
Definition bounding.hpp:235
constexpr const PointType & a() const
Returns the first vertex.
Definition triangle.hpp:208
constexpr bool boundaryContains(const OtherPoint &point) const
Tests whether this shape's boundary contains the other shape (∂A ⊇ B).
Definition boundarycontains.hpp:123
constexpr Rectangle< PointType > bbox() const
Returns the axis-aligned bounding box of the vertices.
Definition bounding.hpp:224
constexpr Convex< PointType > asConvex() const
Returns the triangle as a convex polygon.
Definition triangle.hpp:490
constexpr bool isDegenerate() const
Tests whether the three vertices are collinear.
Definition predicates.hpp:223
constexpr const PointType & c() const
Returns the third vertex.
Definition triangle.hpp:226
constexpr bool interiorContains(const EmptyShape< EmptyPoint > &) const
Tests whether this shape's interior contains the other shape (A∖∂A ⊇ B).
Definition triangle.hpp:806