Function mat4::decompose[][src]

pub fn decompose<T>(
    out: &[T; 16],
    position: &mut [T; 3],
    scale: &mut [T; 3],
    rotation: &mut [T; 4]
) where
    T: Clone + Float + Zero + FromPrimitive + One + Add<T, Output = T> + Sub<T, Output = T> + PartialOrd,
    &'a T: Mul<&'b T, Output = T> + Div<&'b T, Output = T> + Add<&'b T, Output = T> + Sub<&'b T, Output = T>, 

Example

let m = mat4::new_identity();
let mut position = [0f32, 0f32, 0f32];
let mut scale = [1f32, 1f32, 1f32];
let mut rotation = [0f32, 0f32, 0f32, 1f32];
mat4::decompose(&m, &mut position, &mut scale, &mut rotation);
assert_eq!(position, [0f32, 0f32, 0f32]);
assert_eq!(scale, [1f32, 1f32, 1f32]);
assert_eq!(rotation, [0f32, 0f32, 0f32, 1f32]);