feat: 3D Delaunay + 多边形偏移 + 序列化
CI / Build & Test (push) Failing after 34s
CI / Release Build (push) Failing after 25s

- mesh: Bowyer-Watson 3D Delaunay 四面体剖分
- boolean: 2D 多边形偏移(膨胀/腐蚀,角平分线法)
- foundation: 二进制序列化(版本化 Little-Endian 格式)
- 更新 CMake 构建
This commit is contained in:
ViewDesignEngine
2026-07-23 06:28:34 +00:00
parent cf13496ff6
commit 6f7835c458
5 changed files with 220 additions and 0 deletions
+11
View File
@@ -0,0 +1,11 @@
#pragma once
#include "vde/core/polygon.h"
#include <vector>
namespace vde::boolean {
/// Offset a polygon by distance (positive = inflate, negative = deflate)
/// Uses straight skeleton approximation via edge normal displacement
std::vector<Polygon2D> polygon_offset(const Polygon2D& poly, double distance);
} // namespace vde::boolean
+16
View File
@@ -0,0 +1,16 @@
#pragma once
#include "vde/core/point.h"
#include <vector>
#include <array>
namespace vde::mesh {
struct TetrahedronMesh {
std::vector<Point3D> vertices;
std::vector<std::array<int, 4>> tetrahedra; // 4 vertex indices
};
/// 3D Delaunay tetrahedralization (Bowyer-Watson)
TetrahedronMesh delaunay_3d(const std::vector<Point3D>& points);
} // namespace vde::mesh