예제 #1
0
 /// <summary>Converts an array of bytes into Half3.</summary>
 /// <param name="value">A Half3 in it's byte[] representation.</param>
 /// <param name="startIndex">The starting position within value.</param>
 /// <returns>A new Half3 instance.</returns>
 public static Vector3h FromBytes(byte[] value, int startIndex)
 {
     return(new Vector3h(
                Half.FromBytes(value, startIndex),
                Half.FromBytes(value, startIndex + 2),
                Half.FromBytes(value, startIndex + 4)));
 }
예제 #2
0
        /// <summary>Converts an array of bytes into Half2.</summary>
        /// <param name="value">A Half2 in it's byte[] representation.</param>
        /// <param name="startIndex">The starting position within value.</param>
        /// <returns>A new Half2 instance.</returns>
        public static Vector2h FromBytes(byte[] value, int startIndex)
        {
            Vector2h h2 = new Vector2h();

            h2.X = Half.FromBytes(value, startIndex);
            h2.Y = Half.FromBytes(value, startIndex + 2);
            return(h2);
        }
예제 #3
0
파일: Vector2h.cs 프로젝트: conankzhang/fez
 public static Vector2h FromBytes(byte[] value, int startIndex)
 {
     return(new Vector2h()
     {
         X = Half.FromBytes(value, startIndex),
         Y = Half.FromBytes(value, startIndex + 2)
     });
 }
예제 #4
0
        /// <summary>Converts an array of bytes into Half3.</summary>
        /// <param name="value">A Half3 in it's byte[] representation.</param>
        /// <param name="startIndex">The starting position within value.</param>
        /// <returns>A new Half3 instance.</returns>
        public static Vector3h FromBytes(byte[] value, int startIndex)
        {
            Vector3h h3 = new Vector3h();

            h3.X = Half.FromBytes(value, startIndex);
            h3.Y = Half.FromBytes(value, startIndex + 2);
            h3.Z = Half.FromBytes(value, startIndex + 4);
            return(h3);
        }
예제 #5
0
        /// <summary>Converts an array of bytes into Half4.</summary>
        /// <param name="value">A Half4 in it's byte[] representation.</param>
        /// <param name="startIndex">The starting position within value.</param>
        /// <returns>A new Half4 instance.</returns>
        public static Vector4h FromBytes(byte[] value, int startIndex)
        {
            Vector4h h4 = new Vector4h();

            h4.X = Half.FromBytes(value, startIndex);
            h4.Y = Half.FromBytes(value, startIndex + 2);
            h4.Z = Half.FromBytes(value, startIndex + 4);
            h4.W = Half.FromBytes(value, startIndex + 6);
            return(h4);
        }
예제 #6
0
파일: Vector4h.cs 프로젝트: conankzhang/fez
 public static Vector4h FromBytes(byte[] value, int startIndex)
 {
     return(new Vector4h()
     {
         X = Half.FromBytes(value, startIndex),
         Y = Half.FromBytes(value, startIndex + 2),
         Z = Half.FromBytes(value, startIndex + 4),
         W = Half.FromBytes(value, startIndex + 6)
     });
 }