public static void WritePackedTangent(this DSBinaryWriter bin, Vector4 v) { bin.Write((byte)((v.x * 127.0f) + 127f)); bin.Write((byte)((v.y * 127.0f) + 127f)); bin.Write((byte)((v.z * 127.0f) + 127f)); bin.Write((byte)((v.w * 127.0f) + 127f)); }
public static void WriteVector3(this DSBinaryWriter bin, Vector3 v) { bin.Write(v.X); bin.Write(v.Y); bin.Write(v.Z); }
public static void WriteColor(this DSBinaryWriter bin, Color v) { bin.Write(new byte[] { v.R, v.G, v.B, v.A }); }
public static void WriteUV(this DSBinaryWriter bin, Vector2 v) { bin.Write((short)(v.X * 1024.0f)); bin.Write((short)(v.Y * 1024.0f)); }
public static void WriteVector3(this DSBinaryWriter bin, Vector3 v) { bin.Write(v.x); bin.Write(v.y); bin.Write(v.z); }