feat(sdf): S11-B — SDF operations + domain deformations
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.
This commit is contained in:
@@ -106,6 +106,19 @@ 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
|
||||
@@ -131,6 +144,7 @@ target_link_libraries(vde
|
||||
INTERFACE vde_spatial
|
||||
INTERFACE vde_boolean
|
||||
INTERFACE vde_collision
|
||||
INTERFACE vde_sdf
|
||||
INTERFACE vde_brep
|
||||
INTERFACE vde_sketch
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user