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 }; }
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 }); }