public static void Write(this BinaryWriter writer, SVert vert) { writer.Write(vert.Position); writer.Write(vert.Normal); writer.Write(vert.BoneWeights); writer.Write(vert.BoneIndices); writer.Write(vert.Tangent); writer.Write(vert.Binormal); writer.Write(vert.UVW); writer.Write(vert.BoneCount); }
public static SVert ReadSVert(this BinaryReader reader) { var ret = new SVert(); ret.Position = reader.ReadPoint3(); ret.Normal = reader.ReadPoint3(); ret.BoneWeights = reader.ReadQuat(); ret.BoneIndices = reader.ReadBytes(4); ret.Tangent = reader.ReadPoint3(); ret.Binormal = reader.ReadPoint3(); ret.UVW = reader.ReadPoint3(); ret.BoneCount = reader.ReadSingle(); return(ret); }