コード例 #1
0
        internal void RegisterBaseColorAlphaImageName(BabylonTexture texture, string imageName)
        {
            var key = new PairBaseColorAlpha(texture);

            if (!_DicoPairBaseColorAlphaImageName.ContainsKey(key))

            {
                _DicoPairBaseColorAlphaImageName.Add(key, imageName);
            }
        }
コード例 #2
0
        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);
        }
コード例 #3
0
 public bool Equals(PairBaseColorAlpha other)
 {
     return(baseColorPath == other.baseColorPath && alphaPath == other.alphaPath);
 }