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); } }
public static PairBaseColorMetallicRoughness GetStandTextInfo(TexturesPaths textpaths) { foreach (TexturesPaths textPathsObject in _DicoMatTextureGLTF.Keys) { if (textPathsObject.Equals(textpaths)) { return(_DicoMatTextureGLTF[textPathsObject]); } } return(null); }
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); }