26template <
class Number,
class Label>
28 if constexpr (detail::has_label_v<Label>) {
29 stream << point.
label() <<
":(" << point.
x() <<
',' << point.
y() <<
')';
31 stream <<
'(' << point.
x() <<
',' << point.
y() <<
')';
46template <
class Po
intType,
class LabelType>
48 if constexpr (detail::has_label_v<LabelType>) {
49 stream << segment.
label() <<
":{" << segment.
min() <<
"--" << segment.
max() <<
"}";
51 stream << segment.
min() <<
"--" << segment.
max();
68template <
class Po
intType,
class LabelType>
70 if constexpr (detail::has_label_v<LabelType>) {
71 stream << segment.
label() <<
":{" << segment.
source() <<
"->" << segment.
target() <<
"}";
88template <
class Po
intType,
class LabelType>
90 if constexpr (detail::has_label_v<LabelType>) {
91 stream << line.
label() <<
":{-" << line.
min() <<
"--" << line.
max() <<
"-}";
93 stream <<
'-' << line.
min() <<
"--" << line.
max() <<
'-';
108template <
class Po
intType,
class LabelType>
110 if constexpr (detail::has_label_v<LabelType>) {
111 stream << line.
label() <<
":{-" << line.
source() <<
"--" << line.
target() <<
"->}";
113 stream <<
'-' << line.
source() <<
"--" << line.
target() <<
"->";
128template <
class Po
intType,
class LabelType>
130 if constexpr (detail::has_label_v<LabelType>) {
148template <
class Po
intType,
class LabelType>
150 if constexpr (detail::has_label_v<LabelType>) {
151 stream << rectangle.
label() <<
':';
155 if (rectangle.
empty()) {
156 return stream <<
"[]";
158 return stream <<
'[' << rectangle.
min() <<
',' << rectangle.
max() <<
']';
171template <
class Po
intType,
class LabelType>
173 if constexpr (detail::has_label_v<LabelType>) {
174 stream << triangle.
label() <<
":<" << triangle.
a() << triangle.
b() << triangle.
c() <<
">";
176 stream <<
'<' << triangle.
a() << triangle.
b() << triangle.
c() <<
'>';
191template <
class Po
intType,
class LabelType>
193 if constexpr (detail::has_label_v<LabelType>) {
194 stream << halfplane.
label() <<
":^-" << halfplane.
source() <<
"--" << halfplane.
target() <<
"-^";
196 stream <<
"^-" << halfplane.
source() <<
"--" << halfplane.
target() <<
"-^";
211template <
class Po
intType,
class LabelType>
213 if constexpr (detail::has_label_v<LabelType>) {
214 stream << disk.
label() <<
":Disk(" << disk.
a() << disk.
b() << disk.
c() <<
")";
216 stream <<
"Disk(" << disk.
a() << disk.
b() << disk.
c() <<
')';
231template <
class Po
intType,
class LabelType>
233 if constexpr (detail::has_label_v<LabelType>) {
234 stream << convex.
label() <<
':';
237 for (
size_t i = 0; i < convex.
size(); ++i) {
256template <
class Po
intType,
class LabelType>
258 stream <<
"Polygon[";
259 for (std::size_t i = 0; i < polygon.
size(); ++i) {
263 stream << polygon[i];
282template <
class Po
intType,
class LabelType>
284 stream <<
"PolygonWithHoles[" << region.
outer();
285 for (
const auto& hole : region.
holes()) {
286 stream <<
"," << hole;
303template <
class Po
intType,
class LabelType>
305 stream <<
"PolygonSet[";
307 for (
const auto& component : set) {
327template <
class Po
intType,
class LabelType,
class Storage>
329 stream <<
"MonotoneChain[";
330 for (std::size_t i = 0; i < chain.
size(); ++i) {
349template <
class Po
intType,
class LabelType>
351 stream <<
"Polyline[";
352 for (std::size_t i = 0; i < polyline.
size(); ++i) {
356 stream << polyline[i];
375template <
class Po
intType,
class LabelType>
377 if constexpr (detail::has_label_v<LabelType>) {
378 stream << region.
label() <<
":";
380 stream <<
"HalfplaneIntersection[";
381 if (region.
empty()) {
386 for (std::size_t i = 0; i < region.
size(); ++i) {
Definition arrangement.hpp:67
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
Runtime variant wrapper over the currently implemented shape types.
Closed convex polygon stored by its vertices.
Definition convex.hpp:170
constexpr A & label() const
Returns the convex-polygon label.
Definition convex.hpp:270
size_t size() const
Returns the number of vertices in the convex polygon.
Definition convex.hpp:840
Closed Euclidean disk stored by boundary points plus optional disk label.
Definition disk.hpp:66
constexpr const PointType & c() const
Returns the third boundary point in canonical order.
Definition disk.hpp:244
constexpr A & label() const
Returns the disk label.
Definition disk.hpp:183
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
Intersection of closed half-planes; convex but possibly unbounded or empty.
Definition halfplaneintersection.hpp:244
constexpr bool empty() const
Returns whether the region is the empty set.
Definition halfplaneintersection.hpp:649
constexpr A & label() const
Returns the label.
Definition halfplaneintersection.hpp:487
constexpr std::size_t size() const
Returns the number of stored (non-redundant) half-planes.
Definition halfplaneintersection.hpp:596
constexpr bool isPlane() const
Returns whether the region is the whole plane (no half-planes).
Definition halfplaneintersection.hpp:656
Closed half-plane defined by an oriented boundary line.
Definition halfplane.hpp:51
constexpr A & label() const
Returns the half-plane label.
Definition halfplane.hpp:302
constexpr const PointType & target() const
Returns the target boundary point.
Definition halfplane.hpp:193
constexpr const PointType & source() const
Returns the source boundary point.
Definition halfplane.hpp:181
Unoriented infinite line.
Definition line.hpp:52
constexpr const PointType & max() const
Returns the largest stored defining point.
Definition line.hpp:189
constexpr A & label() const
Returns the line label.
Definition line.hpp:262
constexpr const PointType & min() const
Returns the smallest stored defining point.
Definition line.hpp:180
Weakly x-monotone polyline stored by lexicographically sorted vertices.
Definition monotonechain.hpp:146
constexpr std::size_t size() const
Returns the number of vertices in the chain.
Definition monotonechain.hpp:393
Directed infinite line with left/right side semantics plus optional line label.
Definition orientedline.hpp:53
constexpr const PointType & target() const
Returns the target defining point.
Definition orientedline.hpp:195
constexpr A & label() const
Returns the line label.
Definition orientedline.hpp:305
constexpr const PointType & source() const
Returns the source defining point.
Definition orientedline.hpp:183
Directed segment preserving source-to-target order plus optional segment label.
Definition orientedsegment.hpp:44
constexpr const PointType & source() const
Returns the source endpoint.
Definition orientedsegment.hpp:178
constexpr A & label() const
Returns the segment label.
Definition orientedsegment.hpp:302
constexpr const PointType & target() const
Returns the target endpoint.
Definition orientedsegment.hpp:190
Two-dimensional point with optional label payload.
Definition point.hpp:129
constexpr A & label() const
Returns the stored label.
Definition point.hpp:223
constexpr const NumberType & x() const
Returns the x coordinate.
Definition point.hpp:193
constexpr const NumberType & y() const
Returns the y coordinate.
Definition point.hpp:205
Set of closed regions with pairwise disjoint interiors.
Definition polygonset.hpp:165
Closed region bounded by one outer simple polygon minus disjoint polygonal holes.
Definition polygonwithholes.hpp:89
constexpr const PolygonType & outer() const
Returns the outer boundary.
Definition polygonwithholes.hpp:178
constexpr const std::vector< PolygonType > & holes() const
Returns the holes in canonical order.
Definition polygonwithholes.hpp:202
Closed simple polygon stored by its vertices.
Definition polygon.hpp:59
constexpr std::size_t size() const
Returns the number of vertices in the polygon.
Definition polygon.hpp:259
Open polygonal chain stored in traversal order; may self-intersect.
Definition polyline.hpp:69
constexpr std::size_t size() const
Returns the number of vertices in the polyline.
Definition polyline.hpp:388
Half-infinite line starting from one source point plus optional ray label.
Definition ray.hpp:51
constexpr A & label() const
Returns the ray label.
Definition ray.hpp:303
constexpr const PointType & target() const
Returns the second stored point defining the direction.
Definition ray.hpp:193
constexpr const PointType & source() const
Returns the source point of the ray.
Definition ray.hpp:181
Axis-aligned rectangle stored by minimum and maximum corners.
Definition rectangle.hpp:75
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 A & label() const
Returns the rectangle label.
Definition rectangle.hpp:517
constexpr const PointType & max() const
Returns the maximum corner (max x, max y).
Definition rectangle.hpp:359
Unoriented closed segment between two endpoints plus optional segment label.
Definition segment.hpp:58
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
constexpr A & label() const
Returns the segment label.
Definition segment.hpp:275
Closed triangle stored by three vertices.
Definition triangle.hpp:53
constexpr const PointType & b() const
Returns the second vertex.
Definition triangle.hpp:217
constexpr const PointType & a() const
Returns the first vertex.
Definition triangle.hpp:208
constexpr A & label() const
Returns the triangle label.
Definition triangle.hpp:295
constexpr const PointType & c() const
Returns the third vertex.
Definition triangle.hpp:226