ebd29e2a21
Add header-only SDF combinator operations and domain deformation functions based on Inigo Quilez standard formulations: Boolean operations: - op_union (min), op_intersection (max), op_difference (max(-d1,d2)) - Smooth variants: op_smooth_union/intersection/difference with blend radius k with graceful fallback to sharp when k <= 0 Shape modifiers: - op_round (d - r), op_onion (abs(d) - t/2) Domain deformations (coordinate remapping): - op_repeat (infinite grid repetition) - op_mirror_x/y/z (with optional offset) - op_rotate (Y-axis), op_translate, op_scale - op_twist (Y-axis), op_bend, op_cheap_bend - op_elongate, op_displace All functions are inline in include/vde/sdf/sdf_operations.h. Comprehensive unit tests in tests/sdf/test_sdf_operations.cpp covering sharp/smooth booleans, modifiers, domain ops, and composition tests.
10 lines
346 B
CMake
10 lines
346 B
CMake
function(add_vde_sdf_test name)
|
|
add_executable(${name} ${name}.cpp)
|
|
target_link_libraries(${name} PRIVATE vde_sdf GTest::gtest GTest::gtest_main)
|
|
target_include_directories(${name} PRIVATE ${CMAKE_SOURCE_DIR}/include)
|
|
gtest_discover_tests(${name})
|
|
endfunction()
|
|
|
|
add_vde_sdf_test(test_sdf_tree)
|
|
add_vde_sdf_test(test_sdf_to_mesh)
|