Files
ViewDesignEngine/include/vde/boolean/boolean_2d.h
T

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