Matrix.decompose

bool decompose(out graphene.vec3.Vec3 translate, out graphene.vec3.Vec3 scale, out graphene.quaternion.Quaternion rotate, out graphene.vec3.Vec3 shear, out graphene.vec4.Vec4 perspective)

Decomposes a transformation matrix into its component transformations.

The algorithm for decomposing a matrix is taken from the

CSS3 Transforms specification;

specifically, the decomposition code is based on the equivalent code published in "Graphics Gems II", edited by Jim Arvo, and

available online.

Parameters

translatethe translation vector
scalethe scale vector
rotatethe rotation quaternion
shearthe shear vector
perspectivethe perspective vector

Returns

true if the matrix could be decomposed