public MaterialStruct(MaterialStruct other) { numFaces = other.numFaces; startIndex = other.startIndex; materialHash = other.materialHash; materialName = other.materialName; unk3 = other.unk3; }
public FrameMaterial(FrameMaterial other) { bounds = other.bounds; numLods = other.numLods; lodMatCount = other.lodMatCount; materials = new List <MaterialStruct[]>(); for (int i = 0; i < numLods; i++) { MaterialStruct[] array = new MaterialStruct[lodMatCount[i]]; for (int d = 0; d < array.Length; d++) { array[d] = new MaterialStruct(other.materials[i][d]); } materials.Add(array); } }
public void ReadFromFile(MemoryStream reader, bool isBigEndian) { numLods = reader.ReadByte8(); lodMatCount = new int[numLods]; for (int i = 0; i != numLods; i++) { lodMatCount[i] = reader.ReadInt32(isBigEndian); } materials = new List <MaterialStruct[]>(); bounds = BoundingBoxExtenders.ReadFromFile(reader, isBigEndian); for (int i = 0; i != numLods; i++) { MaterialStruct[] array = new MaterialStruct[lodMatCount[i]]; for (int d = 0; d != array.Length; d++) { array[d] = new MaterialStruct(reader, isBigEndian); } materials.Add(array); } }