コード例 #1
0
 /// <summary>
 /// Writes a <see cref="Vector4Bool"/> instance into the current stream.
 /// </summary>
 /// <param name="self">The extended <see cref="BinaryDataWriter"/>.</param>
 /// <param name="value">The <see cref="Vector4Bool"/> instance.</param>
 /// <param name="format">The <see cref="BinaryBooleanFormat"/> in which values are stored.</param>
 public static void Write(this BinaryDataWriter self, Vector4Bool value,
                          BinaryBooleanFormat format = BinaryBooleanFormat.NonZeroByte)
 {
     self.Write(value.X, format);
     self.Write(value.Y, format);
     self.Write(value.Z, format);
     self.Write(value.W, format);
 }
コード例 #2
0
 /// <summary>
 /// Reads <see cref="Vector4Bool"/> instances from the current stream and returns them.
 /// </summary>
 /// <param name="self">The extended <see cref="BinaryDataReader"/>.</param>
 /// <param name="count">The number of instances to read.</param>
 /// <param name="format">The <see cref="BinaryBooleanFormat"/> in which values are stored.</param>
 /// <returns>The <see cref="Vector4Bool"/> instances.</returns>
 public static IList <Vector4Bool> ReadVector4Bools(this BinaryDataReader self, int count,
                                                    BinaryBooleanFormat format = BinaryBooleanFormat.NonZeroByte)
 {
     Vector4Bool[] values = new Vector4Bool[count];
     for (int i = 0; i < count; i++)
     {
         values[i] = self.ReadVector4Bool(format);
     }
     return(values);
 }