예제 #1
0
 public MaterialStruct(MaterialStruct other)
 {
     numFaces     = other.numFaces;
     startIndex   = other.startIndex;
     materialHash = other.materialHash;
     materialName = other.materialName;
     unk3         = other.unk3;
 }
예제 #2
0
 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);
     }
 }
예제 #3
0
        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);
            }
        }