Пример #1
0
        /// <summary>
        /// Reads a matrix written using WriteMatrix()
        /// </summary>
        public static void ReadMatrix(this NetBuffer message, ref Matrix destination)
        {
            Quaternion rot = message.ReadRotation(24);

            destination     = Matrix.CreateFromQuaternion(rot);
            destination.M41 = message.ReadSingle();
            destination.M42 = message.ReadSingle();
            destination.M43 = message.ReadSingle();
        }
Пример #2
0
        /// <summary>
        /// Reads a matrix written using WriteMatrix()
        /// </summary>
        public static Matrix ReadMatrix(this NetBuffer message)
        {
            Quaternion rot    = message.ReadRotation(24);
            Matrix     retval = Matrix.CreateFromQuaternion(rot);

            retval.M41 = message.ReadSingle();
            retval.M42 = message.ReadSingle();
            retval.M43 = message.ReadSingle();
            return(retval);
        }