14 lines
408 B
C++
14 lines
408 B
C++
|
|
#pragma once
|
||
|
|
#include "vde/core/polygon.h"
|
||
|
|
#include <vector>
|
||
|
|
|
||
|
|
namespace vde::boolean {
|
||
|
|
|
||
|
|
enum class BooleanOp { Union, Intersection, Difference, SymDiff };
|
||
|
|
|
||
|
|
/// 2D polygon boolean operations (Vatti algorithm)
|
||
|
|
/// Currently implemented via a simple edge walking approach for convex polygons
|
||
|
|
std::vector<Polygon2D> boolean_2d(const Polygon2D& a, const Polygon2D& b, BooleanOp op);
|
||
|
|
|
||
|
|
} // namespace vde::boolean
|