示例#1
0
        private void RotationToEulerAngles(BabylonAbstractMesh babylonMesh, IQuat rotation)
        {
            float rotx = 0, roty = 0, rotz = 0;

            unsafe
            {
                rotation.GetEuler(new IntPtr(&rotx), new IntPtr(&roty), new IntPtr(&rotz));
            }
            babylonMesh.rotation = new[] { rotx, roty, rotz };
        }
示例#2
0
        private float[] QuaternionToEulerAngles(IQuat rotation)
        {
            float rotx = 0, roty = 0, rotz = 0;

            unsafe
            {
                rotation.GetEuler(new IntPtr(&rotx), new IntPtr(&roty), new IntPtr(&rotz));
            }
            return(new[] { rotx, roty, rotz });
        }
 private void RotationToEulerAngles(BabylonAbstractMesh babylonMesh, IQuat rotation)
 {
     float rotx = 0, roty = 0, rotz = 0;
     unsafe
     {
         rotation.GetEuler(new IntPtr(&rotx), new IntPtr(&roty), new IntPtr(&rotz));
     }
     babylonMesh.rotation = new[] { rotx, roty, rotz };
 }