(handle: f64, anim_index: f64, time: f64, scale: f64, px: f64, py: f64, pz: f64, rot_y: f64)
| 1970 | |
| 1971 | #[no_mangle] |
| 1972 | pub extern "C" fn bloom_update_model_animation(handle: f64, anim_index: f64, time: f64, scale: f64, px: f64, py: f64, pz: f64, rot_y: f64) { |
| 1973 | // Take a single Y-axis angle (radians) instead of sin/cos, so the |
| 1974 | // engine reconstructs both with full precision + correct signs. |
| 1975 | // Older callers that passed (rot_sin, rot_cos) hit a Perry-ARM64 |
| 1976 | // 9th-arg garbling bug AND a sqrt(1-sin²) workaround that lost |
| 1977 | // the sign of cos — model rotation was correct only on half the |
| 1978 | // circle. 8-arg signature dodges both issues. |
| 1979 | let rot_y_f = rot_y as f32; |
| 1980 | let rot_sin = rot_y_f.sin(); |
| 1981 | let rot_cos = rot_y_f.cos(); |
| 1982 | let eng = engine(); |
| 1983 | eng.models.update_model_animation(handle, anim_index as usize, time as f32); |
| 1984 | if let Some(anim) = eng.models.get_animation(handle) { |
| 1985 | if !anim.joint_matrices.is_empty() { |
| 1986 | eng.renderer.set_joint_matrices_scaled(&anim.joint_matrices, scale as f32, [px as f32, py as f32, pz as f32], rot_sin, rot_cos); |
| 1987 | } |
| 1988 | } |
| 1989 | } |
| 1990 | |
| 1991 | #[no_mangle] |
| 1992 | pub extern "C" fn bloom_get_model_mesh_count(handle: f64) -> f64 { |
nothing calls this directly
no test coverage detected