MCPcopy Create free account
hub / github.com/Bloom-Engine/engine / bloom_scene_subtract_box

Function bloom_scene_subtract_box

native/macos/src/lib.rs:2767–2785  ·  view source on GitHub ↗
(
    handle: f64,
    min_x: f64, min_y: f64, min_z: f64,
    max_x: f64, max_y: f64, max_z: f64,
)

Source from the content-addressed store, hash-verified

2765/// Removes triangles fully inside the box (simplified CSG).
2766#[no_mangle]
2767pub extern "C" fn bloom_scene_subtract_box(
2768 handle: f64,
2769 min_x: f64, min_y: f64, min_z: f64,
2770 max_x: f64, max_y: f64, max_z: f64,
2771) {
2772 let eng = engine();
2773 if let Some(node) = eng.scene.nodes.get(handle) {
2774 let current = bloom_shared::geometry::GeometryData {
2775 vertices: node.vertices.clone(),
2776 indices: node.indices.clone(),
2777 };
2778 let result = bloom_shared::geometry::subtract_box(
2779 &current,
2780 [min_x as f32, min_y as f32, min_z as f32],
2781 [max_x as f32, max_y as f32, max_z as f32],
2782 );
2783 eng.scene.update_geometry(handle, result.vertices, result.indices);
2784 }
2785}
2786
2787// ============================================================
2788// Shadow mapping

Callers

nothing calls this directly

Calls 5

subtract_boxFunction · 0.85
cloneMethod · 0.80
update_geometryMethod · 0.80
engineFunction · 0.70
getMethod · 0.45

Tested by

no test coverage detected