v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0

This commit is contained in:
ViewDesignEngine
2026-07-23 05:27:51 +00:00
commit 02d0520aa5
133 changed files with 5350 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
#include <gtest/gtest.h>
#include "vde/boolean/boolean_2d.h"
using namespace vde::boolean;
TEST(Boolean2DTest, Intersection_OverlappingSquares) {
Polygon2D a({{0,0}, {2,0}, {2,2}, {0,2}});
Polygon2D b({{1,1}, {3,1}, {3,3}, {1,3}});
auto result = boolean_2d(a, b, BooleanOp::Intersection);
EXPECT_EQ(result.size(), 1u);
}
TEST(Boolean2DTest, Intersection_Disjoint) {
Polygon2D a({{0,0}, {1,0}, {1,1}, {0,1}});
Polygon2D b({{2,2}, {3,2}, {3,3}, {2,3}});
auto result = boolean_2d(a, b, BooleanOp::Intersection);
EXPECT_TRUE(result.empty() || result[0].empty());
}