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

Function bloom_scene_extrude_polygon

native/macos/src/lib.rs:2750–2762  ·  view source on GitHub ↗
(
    handle: f64,
    polygon_ptr: *const f64,
    polygon_count: f64,
    depth: f64,
)

Source from the content-addressed store, hash-verified

2748/// depth: extrusion height
2749#[no_mangle]
2750pub extern "C" fn bloom_scene_extrude_polygon(
2751 handle: f64,
2752 polygon_ptr: *const f64,
2753 polygon_count: f64,
2754 depth: f64,
2755) {
2756 if polygon_ptr.is_null() { return; }
2757 let n = polygon_count as usize;
2758 let polygon = unsafe { std::slice::from_raw_parts(polygon_ptr, n * 2) };
2759
2760 let geo = bloom_shared::geometry::extrude_polygon(polygon, &[], depth);
2761 engine().scene.update_geometry(handle, geo.vertices, geo.indices);
2762}
2763
2764/// Subtract an axis-aligned box from a scene node's geometry.
2765/// Removes triangles fully inside the box (simplified CSG).

Callers

nothing calls this directly

Calls 3

extrude_polygonFunction · 0.85
update_geometryMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected