Example #1
0
		static Matrix4d ToMatrix4d (CMRotationMatrix m)
		{
			return new Matrix4d (
				new Vector4d (m.m11, m.m12, m.m13, 0),
				new Vector4d (m.m21, m.m22, m.m23, 0),
				new Vector4d (m.m31, m.m32, m.m33, 0),
				new Vector4d (0, 0, 0, 1));
		}
Example #2
0
 static Matrix4d ToMatrix4d(CMRotationMatrix m)
 {
     return(new Matrix4d(
                new Vector4d(m.m11, m.m12, m.m13, 0),
                new Vector4d(m.m21, m.m22, m.m23, 0),
                new Vector4d(m.m31, m.m32, m.m33, 0),
                new Vector4d(0, 0, 0, 1)));
 }
Example #3
0
        public static void TransformFromCMRotationMatrix(ref float[] mout, CMRotationMatrix m)
        {
            mout[0] = (float)m.m11;
            mout[1] = (float)m.m21;
            mout[2] = (float)m.m31;
            mout[3] = 0.0f;

            mout[4] = (float)m.m12;
            mout[5] = (float)m.m22;
            mout[6] = (float)m.m32;
            mout[7] = 0.0f;

            mout[8]  = (float)m.m13;
            mout[9]  = (float)m.m23;
            mout[10] = (float)m.m33;
            mout[11] = 0.0f;

            mout[12] = 0.0f;
            mout[13] = 0.0f;
            mout[14] = 0.0f;
            mout[15] = 1.0f;
        }