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

Function bloom_scene_set_transform

native/macos/src/lib.rs:2535–2545  ·  view source on GitHub ↗
(handle: f64, mat_ptr: *const f64)

Source from the content-addressed store, hash-verified

2533/// Set 4x4 transform matrix (16 floats passed as pointer to f64 array).
2534#[no_mangle]
2535pub extern "C" fn bloom_scene_set_transform(handle: f64, mat_ptr: *const f64) {
2536 if mat_ptr.is_null() { return; }
2537 let slice = unsafe { std::slice::from_raw_parts(mat_ptr, 16) };
2538 let mut mat = [[0.0f32; 4]; 4];
2539 for col in 0..4 {
2540 for row in 0..4 {
2541 mat[col][row] = slice[col * 4 + row] as f32;
2542 }
2543 }
2544 engine().scene.set_transform(handle, mat);
2545}
2546
2547/// Update geometry from flat vertex array (12 floats/vertex: xyz, nxnynz, rgba, uv)
2548/// and index array.

Callers

nothing calls this directly

Calls 2

set_transformMethod · 0.80
engineFunction · 0.70

Tested by

no test coverage detected