21#include "manifold/common.h"
22#include "manifold/vec_view.h"
111 std::vector<CrossSection>
Decompose()
const;
140 int circularSegments = 0)
const;
149 const std::vector<CrossSection>& crossSections,
OpType op);
168 mutable std::shared_ptr<const PathImpl> paths_;
169 mutable mat2x3 transform_ = la::identity;
171 std::shared_ptr<const PathImpl> GetPaths()
const;
Two-dimensional cross sections guaranteed to be without self-intersections, or overlaps between polyg...
Definition cross_section.h:41
CrossSection Boolean(const CrossSection &second, OpType op) const
Definition cross_section.cpp:359
CrossSection & operator+=(const CrossSection &)
Definition cross_section.cpp:407
Polygons ToPolygons() const
Definition cross_section.cpp:775
CrossSection WarpBatch(std::function< void(VecView< vec2 >)> warpFunc) const
Definition cross_section.cpp:574
CrossSection operator+(const CrossSection &) const
Definition cross_section.cpp:399
CrossSection operator^(const CrossSection &) const
Definition cross_section.cpp:432
CrossSection Translate(const vec2 v) const
Definition cross_section.cpp:485
CrossSection Mirror(const vec2 ax) const
Definition cross_section.cpp:528
CrossSection & operator-=(const CrossSection &)
Definition cross_section.cpp:424
std::vector< CrossSection > Decompose() const
Definition cross_section.cpp:458
CrossSection Transform(const mat2x3 &m) const
Definition cross_section.cpp:544
static CrossSection Compose(std::vector< CrossSection > &)
Definition cross_section.cpp:449
CrossSection Rotate(double degrees) const
Definition cross_section.cpp:498
static CrossSection BatchBoolean(const std::vector< CrossSection > &crossSections, OpType op)
Definition cross_section.cpp:371
int NumVert() const
Definition cross_section.cpp:743
bool IsEmpty() const
Definition cross_section.cpp:761
CrossSection Offset(double delta, JoinType jt, double miter_limit=2.0, int circularSegments=0) const
Definition cross_section.cpp:656
FillRule
Definition cross_section.h:66
@ Positive
Only sub-regions with winding counts > 0 are filled.
@ NonZero
Only non-zero sub-regions are filled.
@ EvenOdd
Only odd numbered sub-regions are filled.
@ Negative
Only sub-regions with winding counts < 0 are filled.
CrossSection & operator^=(const CrossSection &)
Definition cross_section.cpp:440
CrossSection Simplify(double epsilon=1e-6) const
Definition cross_section.cpp:610
CrossSection Hull() const
Definition cross_section.cpp:702
CrossSection Warp(std::function< void(vec2 &)> warpFunc) const
Definition cross_section.cpp:559
double Area() const
Definition cross_section.cpp:738
CrossSection()
Definition cross_section.cpp:212
CrossSection Scale(const vec2 s) const
Definition cross_section.cpp:513
Rect Bounds() const
Definition cross_section.cpp:767
JoinType
Definition cross_section.h:82
CrossSection operator-(const CrossSection &) const
Definition cross_section.cpp:416
int NumContour() const
Definition cross_section.cpp:756
static CrossSection Circle(double radius, int circularSegments=0)
Definition cross_section.cpp:342
constexpr double degrees(double a)
Definition common.h:75
std::vector< SimplePolygon > Polygons
Set of polygons with holes. Order of contours is arbitrary. Can contain any depth of nested holes and...
Definition common.h:139
OpType
Boolean operation type: Add (Union), Subtract (Difference), and Intersect.
Definition common.h:473
std::vector< vec2 > SimplePolygon
Single polygon contour, wound CCW. First and last point are implicitly connected. Should ensure all i...
Definition common.h:131
Axis-aligned 2D box, primarily for bounding.
Definition common.h:307