Inheritance: IBinarySerializable
Beispiel #1
0
        /// <inheritdoc/>
        public void LoadBinaryData(byte[] inData)
        {
            using var ms = new MemoryStream(inData);
            using var br = new BinaryReader(ms);
            var materialCount = inData.Length / ModelMaterial.GetSize();

            for (var i = 0; i < materialCount; ++i)
            {
                Materials.Add(new ModelMaterial(br.ReadBytes(ModelMaterial.GetSize())));
            }
        }
Beispiel #2
0
 public void LoadBinaryData(byte[] inData)
 {
     using (MemoryStream ms = new MemoryStream(inData))
     {
         using (BinaryReader br = new BinaryReader(ms))
         {
             int materialCount = inData.Length / ModelMaterial.GetSize();
             for (int i = 0; i < materialCount; ++i)
             {
                 this.Materials.Add(new ModelMaterial(br.ReadBytes(ModelMaterial.GetSize())));
             }
         }
     }
 }