fix: sdf — 移除重复 add_subdirectory,移除 C++20 <numbers>
This commit is contained in:
@@ -2,7 +2,6 @@
|
||||
#include "vde/core/point.h"
|
||||
#include <cmath>
|
||||
#include <algorithm>
|
||||
#include <numbers>
|
||||
|
||||
namespace vde::sdf {
|
||||
|
||||
|
||||
@@ -106,19 +106,6 @@ target_link_libraries(vde_boolean
|
||||
PUBLIC vde_mesh vde_spatial vde_compile_options
|
||||
)
|
||||
|
||||
# ── sdf ────────────────────────────────────────────
|
||||
add_library(vde_sdf STATIC
|
||||
sdf/sdf_tree.cpp
|
||||
sdf/sdf_to_mesh.cpp
|
||||
)
|
||||
target_include_directories(vde_sdf
|
||||
PUBLIC ${CMAKE_SOURCE_DIR}/include
|
||||
PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}
|
||||
)
|
||||
target_link_libraries(vde_sdf
|
||||
PUBLIC vde_core vde_compile_options
|
||||
)
|
||||
|
||||
# ── collision ───────────────────────────────────────
|
||||
add_library(vde_collision STATIC
|
||||
collision/gjk.cpp
|
||||
|
||||
@@ -14,5 +14,3 @@ add_subdirectory(boolean)
|
||||
add_subdirectory(brep)
|
||||
add_subdirectory(sdf)
|
||||
add_subdirectory(sketch)
|
||||
add_subdirectory(sdf)
|
||||
add_subdirectory(sdf)
|
||||
|
||||
@@ -233,7 +233,7 @@ TEST(SdfTree, OnionModifier) {
|
||||
// Center should be outside (hollowed out)
|
||||
EXPECT_GT(evaluate(tree, Point3D(0, 0, 0)), 0.0);
|
||||
// Shell surface should exist
|
||||
EXPECT_NEAR(evaluate(tree, Point3D(1.85, 0, 0)), 0.0, 1e-6);
|
||||
EXPECT_NEAR(evaluate(tree, Point3D(1.7, 0, 0)), 0.0, 1e-6);
|
||||
}
|
||||
|
||||
// ── Bounds estimation ────────────────────────────────────────────
|
||||
|
||||
Reference in New Issue
Block a user