internal void RegisterBaseColorAlphaImageName(BabylonTexture texture, string imageName) { var key = new PairBaseColorAlpha(texture); if (!_DicoPairBaseColorAlphaImageName.ContainsKey(key)) { _DicoPairBaseColorAlphaImageName.Add(key, imageName); } }
internal string BaseColorAlphaImageNameLookup(BabylonTexture texture, string defaultName = null) { var key = new PairBaseColorAlpha(texture); string imageName = null; if (_DicoPairBaseColorAlphaImageName.TryGetValue(key, out imageName)) { return(imageName); } key = _DicoPairBaseColorAlphaImageName.Keys.Where(k => k.baseColorPath.Equals(key.baseColorPath)).FirstOrDefault(); return(key != null ? _DicoPairBaseColorAlphaImageName[key] : defaultName); }
public bool Equals(PairBaseColorAlpha other) { return(baseColorPath == other.baseColorPath && alphaPath == other.alphaPath); }