示例#1
0
 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));
 }
示例#2
0
 public static void WriteVector3(this DSBinaryWriter bin, Vector3 v)
 {
     bin.Write(v.X);
     bin.Write(v.Y);
     bin.Write(v.Z);
 }
示例#3
0
 public static void WriteColor(this DSBinaryWriter bin, Color v)
 {
     bin.Write(new byte[] { v.R, v.G, v.B, v.A });
 }
示例#4
0
 public static void WriteUV(this DSBinaryWriter bin, Vector2 v)
 {
     bin.Write((short)(v.X * 1024.0f));
     bin.Write((short)(v.Y * 1024.0f));
 }
示例#5
0
 public static void WriteVector3(this DSBinaryWriter bin, Vector3 v)
 {
     bin.Write(v.x);
     bin.Write(v.y);
     bin.Write(v.z);
 }