public static MaterialTextureDesc[] Export(MaterialTexture[] src) { return src.Select(e => { var dest = new MaterialTextureDesc(); e.Export(dest); return dest; }).ToArray(); }
public static MaterialTexture[] Import(MaterialTextureDesc[] src) { return src.Select(e => { var dest = new MaterialTexture(); dest.Import(e); return dest; }).ToArray(); }
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; }