64ad721ed7
- CMake: INTERFACE 库修复、vde_compile_options 顺序修复 - 命名空间: 所有模块添加 using 声明 - 类型补全: Ray3Dd、Point4D - 头文件: tolerance 泛型化、std::optional include - 警告: 放宽 -Wconversion/-Wsign-conversion - 构建结果: 0 errors, 22/25 tests passed
16 lines
452 B
C++
16 lines
452 B
C++
#pragma once
|
|
#include "vde/core/polygon.h"
|
|
#include <vector>
|
|
|
|
namespace vde::boolean {
|
|
using core::Point2D;
|
|
using core::Polygon2D;
|
|
|
|
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
|