Esempio n. 1
0
 public static MaterialTextureDesc[] Export(MaterialTexture[] src)
 {
     return src.Select(e =>
     {
         var dest = new MaterialTextureDesc();
         e.Export(dest);
         return dest;
     }).ToArray();
 }
Esempio n. 2
0
 public static MaterialTexture[] Import(MaterialTextureDesc[] src)
 {
     return src.Select(e =>
     {
         var dest = new MaterialTexture();
         dest.Import(e);
         return dest;
     }).ToArray();
 }
Esempio n. 3
0
 public void Import(MaterialTextureDesc src)
 {
     var dest = this;
     dest.AddressU = src.SamplerStates.AddressU;
     dest.AddressV = src.SamplerStates.AddressV;
     dest.AddressW = src.SamplerStates.AddressW;
     dest.BorderColor = src.SamplerStates.BorderColor;
     dest.ComparisonFunction = src.SamplerStates.ComparisonFunction;
     dest.Filter = src.SamplerStates.Filter;
     dest.MaximumAnisotropy = src.SamplerStates.MaximumAnisotropy;
     dest.MaximumLod = src.SamplerStates.MaximumLod;
     dest.MinimumLod = src.SamplerStates.MinimumLod;
     dest.MipLodBias = src.SamplerStates.MipLodBias;
     dest.TextureFile = src.TextureFile;
 }