Ejemplo n.º 1
0
 public bool Equals(TexturesPaths textpaths)
 {
     if ((this.diffusePath == textpaths.diffusePath) && (this.opacityPath == textpaths.opacityPath) && (this.specularName == textpaths.specularName) && (this.diffuse.SequenceEqual(textpaths.diffuse)) && (this.opacity == textpaths.opacity) && (this.specular.SequenceEqual(textpaths.specular)) && (this.glossiness == textpaths.glossiness))
     {
         return(true);
     }
     else
     {
         return(false);
     }
 }
Ejemplo n.º 2
0
 public static PairBaseColorMetallicRoughness GetStandTextInfo(TexturesPaths textpaths)
 {
     foreach (TexturesPaths textPathsObject  in _DicoMatTextureGLTF.Keys)
     {
         if (textPathsObject.Equals(textpaths))
         {
             return(_DicoMatTextureGLTF[textPathsObject]);
         }
     }
     return(null);
 }
Ejemplo n.º 3
0
        public static TexturesPaths SetStandText(BabylonStandardMaterial babylonStandardMaterial)
        {
            var _StandText = new TexturesPaths();

            if (babylonStandardMaterial.diffuseTexture != null)
            {
                _StandText.diffusePath = babylonStandardMaterial.diffuseTexture.originalPath;
            }
            else
            {
                _StandText.diffusePath = "none";
            }

            if (babylonStandardMaterial.specularTexture != null)
            {
                _StandText.specularName = babylonStandardMaterial.specularTexture.name;
            }
            else
            {
                _StandText.specularName = "none";
            }

            if ((babylonStandardMaterial.diffuseTexture == null || babylonStandardMaterial.diffuseTexture.hasAlpha == false) && babylonStandardMaterial.opacityTexture != null)
            {
                _StandText.opacityPath = babylonStandardMaterial.opacityTexture.originalPath;
            }
            else
            {
                _StandText.opacityPath = "none";
            }
            _StandText.diffuse    = babylonStandardMaterial.diffuse;
            _StandText.opacity    = babylonStandardMaterial.alpha;
            _StandText.specular   = babylonStandardMaterial.specular;
            _StandText.glossiness = babylonStandardMaterial.specularPower;
            return(_StandText);
        }