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

Function bloom_scene_extrude_polygon

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

Source from the content-addressed store, hash-verified

2069
2070#[no_mangle]
2071pub extern "C" fn bloom_scene_extrude_polygon(
2072 handle: f64,
2073 polygon_ptr: *const f64,
2074 polygon_count: f64,
2075 depth: f64,
2076) {
2077 if polygon_ptr.is_null() { return; }
2078 let n = polygon_count as usize;
2079 let polygon = unsafe { std::slice::from_raw_parts(polygon_ptr, n * 2) };
2080
2081 let geo = bloom_shared::geometry::extrude_polygon(polygon, &[], depth);
2082 engine().scene.update_geometry(handle, geo.vertices, geo.indices);
2083}
2084
2085#[no_mangle]
2086pub extern "C" fn bloom_scene_get_bounds_max_x(handle: f64) -> f64 { engine().scene.get_bounds(handle).1[0] as f64 }

Callers

nothing calls this directly

Calls 3

extrude_polygonFunction · 0.85
update_geometryMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected