private static void DecomposeTransform(NodeContent node, out Pose pose, out Vector3F scale)
        {
            // Get local transform of node.
            Matrix44F transform = (Matrix44F)node.Transform;

            // Decompose transform into scale, rotation, and translation.
            Matrix33F rotation;
            Vector3F  translation;

            transform.Decompose(out scale, out rotation, out translation);

            // Return pose (position + orientation).
            pose = new Pose(translation, rotation);
        }
Ejemplo n.º 2
0
        public void DecomposeShouldFail()
        {
            Matrix44F matrix = new Matrix44F();

              Vector3F scaleOfMatrix;
              QuaternionF rotationOfMatrix;
              Vector3F translationOfMatrix;
              bool result = matrix.Decompose(out scaleOfMatrix, out rotationOfMatrix, out translationOfMatrix);
              Assert.IsFalse(result);

              matrix = new Matrix44F(rowMajor, MatrixOrder.RowMajor);
              result = matrix.Decompose(out scaleOfMatrix, out rotationOfMatrix, out translationOfMatrix);
              Assert.IsFalse(result);
        }