v0.1.0: 初始工程骨架 — 7模块 40头文件 32源文件 17文档 Apache-2.0
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
add_executable(boolean_ops main.cpp)
|
||||
target_link_libraries(boolean_ops PRIVATE vde)
|
||||
@@ -0,0 +1,13 @@
|
||||
#include <iostream>
|
||||
#include "vde/boolean/boolean_2d.h"
|
||||
|
||||
int main() {
|
||||
using namespace vde::boolean;
|
||||
Polygon2D a({{0,0},{3,0},{3,3},{0,3}});
|
||||
Polygon2D b({{1,1},{4,1},{4,4},{1,4}});
|
||||
auto result = boolean_2d(a, b, BooleanOp::Intersection);
|
||||
std::cout << "Intersection result polygons: " << result.size() << "\n";
|
||||
if (!result.empty())
|
||||
std::cout << "Result vertices: " << result[0].size() << "\n";
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user