public TRIModifierData(BinaryReader reader) : base() { this.nameSize = reader.ReadInt32(); byte[] bytes = reader.ReadBytes(this.nameSize); this.name = TRIFile.BytesToString(bytes); this.dataSize = reader.ReadInt32(); for (int i = 0; i < this.dataSize; i++) { this.Add(reader.ReadInt32()); } }
public TRIMorphData(BinaryReader reader, int size) : base() { this.nameSize = reader.ReadInt32(); byte[] bytes = reader.ReadBytes(this.nameSize); this.name = TRIFile.BytesToString(bytes); this.scaleMinX = reader.ReadByte(); this.scaleMinY = reader.ReadByte(); this.scaleMinZ = reader.ReadByte(); this.scaleMult = reader.ReadByte(); for (int i = 0; i < size; i++) { VertexDisplacement vert = new VertexDisplacement(reader); this.Add(vert); } }
public TRIHeader(BinaryReader reader) { reader.ReadBytes(5); byte[] version = reader.ReadBytes(3); this.version = TRIFile.BytesToString(version); this.vertexCount = reader.ReadInt32(); this.polytriCount = reader.ReadInt32(); this.polyquadCount = reader.ReadInt32(); this.unknown2 = reader.ReadInt32(); this.unknown3 = reader.ReadInt32(); this.uvVertexCount = reader.ReadInt32(); this.flags = reader.ReadInt32(); this.morphCount = reader.ReadInt32(); this.modifierCount = reader.ReadInt32(); this.modVertexCount = reader.ReadInt32(); this.unknown7 = reader.ReadInt32(); this.unknown8 = reader.ReadInt32(); this.unknown9 = reader.ReadInt32(); this.unknown10 = reader.ReadInt32(); }