(handle: f64, mat_ptr: *const f64)
| 2533 | /// Set 4x4 transform matrix (16 floats passed as pointer to f64 array). |
| 2534 | #[no_mangle] |
| 2535 | pub 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. |
nothing calls this directly
no test coverage detected