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

Function mat4_transform_dir

native/shared/src/picking.rs:287–294  ·  view source on GitHub ↗
(m: &[[f32; 4]; 4], d: &[f32; 3])

Source from the content-addressed store, hash-verified

285}
286
287fn mat4_transform_dir(m: &[[f32; 4]; 4], d: &[f32; 3]) -> [f32; 3] {
288 // Transform direction (no translation, no perspective divide)
289 [
290 m[0][0]*d[0] + m[1][0]*d[1] + m[2][0]*d[2],
291 m[0][1]*d[0] + m[1][1]*d[1] + m[2][1]*d[2],
292 m[0][2]*d[0] + m[1][2]*d[1] + m[2][2]*d[2],
293 ]
294}
295
296fn mat4_inverse_local(m: &[[f32; 4]; 4]) -> [[f32; 4]; 4] {
297 crate::renderer::mat4_invert(*m)

Callers 2

raycast_sceneFunction · 0.85
raycast_scene_allFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected