Add IntX write stream support.

This commit is contained in:
2021-04-08 19:00:40 +02:00
parent 8e7ff6f657
commit 992f4b2303
+36
View File
@@ -392,6 +392,42 @@ namespace FlaxEngine
stream.Write(value.W);
}
/// <summary>
/// Writes the Int2 to the binary stream.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="value">The value to write.</param>
public static void Write(this BinaryWriter stream, Int2 value)
{
stream.Write(value.X);
stream.Write(value.Y);
}
/// <summary>
/// Writes the Int3 to the binary stream.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="value">The value to write.</param>
public static void Write(this BinaryWriter stream, Int3 value)
{
stream.Write(value.X);
stream.Write(value.Y);
stream.Write(value.Z);
}
/// <summary>
/// Writes the Int4 to the binary stream.
/// </summary>
/// <param name="stream">The stream.</param>
/// <param name="value">The value to write.</param>
public static void Write(this BinaryWriter stream, Int4 value)
{
stream.Write(value.X);
stream.Write(value.Y);
stream.Write(value.Z);
stream.Write(value.W);
}
/// <summary>
/// Writes the Quaternion to the binary stream.
/// </summary>