Exemple #1
0
        /// <inheritdoc />
        public bool Equals([AllowNull] Lighting other)
        {
            if (other == null)
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return
                ((
                     VertexNormalsEpsilon == other.VertexNormalsEpsilon ||
                     VertexNormalsEpsilon != null &&
                     VertexNormalsEpsilon.Equals(other.VertexNormalsEpsilon)
                     ) &&
                 (
                     FaceNormalsEpsilon == other.FaceNormalsEpsilon ||
                     FaceNormalsEpsilon != null &&
                     FaceNormalsEpsilon.Equals(other.FaceNormalsEpsilon)
                 ) &&
                 (
                     Ambient == other.Ambient ||
                     Ambient != null &&
                     Ambient.Equals(other.Ambient)
                 ) &&
                 (
                     Diffuse == other.Diffuse ||
                     Diffuse != null &&
                     Diffuse.Equals(other.Diffuse)
                 ) &&
                 (
                     Specular == other.Specular ||
                     Specular != null &&
                     Specular.Equals(other.Specular)
                 ) &&
                 (
                     Roughness == other.Roughness ||
                     Roughness != null &&
                     Roughness.Equals(other.Roughness)
                 ) &&
                 (
                     Fresnel == other.Fresnel ||
                     Fresnel != null &&
                     Fresnel.Equals(other.Fresnel)
                 ));
        }
 /// <summary>
 /// Test to see if this material is equal to another.
 /// </summary>
 /// <param name="other">The material to test against.</param>
 /// <returns>True if the object is equal to this one. False, otherwise.</returns>
 public bool Equals(MeshStandardMaterial other)
 {
     if (other == null)
     {
         return(false);
     }
     return(Roughness.Equals(other.Roughness) &&
            Metalness.Equals(other.Metalness) &&
            Ambient.Equals(other.Ambient) &&
            Color.Equals(other.Color) &&
            Emissive.Equals(other.Emissive) &&
            Map == other.Map &&
            BumpMap == other.BumpMap &&
            AlphaMap == other.AlphaMap &&
            EnvironmentMap == other.EnvironmentMap);
 }
Exemple #3
0
        public bool Equals([AllowNull] Lighting other)
        {
            if (other == null)
            {
                return(false);
            }

            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return((Ambient == other.Ambient && Ambient != null && other.Ambient != null && Ambient.Equals(other.Ambient)) &&
                   (Diffuse == other.Diffuse && Diffuse != null && other.Diffuse != null && Diffuse.Equals(other.Diffuse)) &&
                   (Specular == other.Specular && Specular != null && other.Specular != null && Specular.Equals(other.Specular)) &&
                   (Roughness == other.Roughness && Roughness != null && other.Roughness != null && Roughness.Equals(other.Roughness)) &&
                   (Fresnel == other.Fresnel && Fresnel != null && other.Fresnel != null && Fresnel.Equals(other.Fresnel)));
        }
 public bool Equals(SurfaceEllipsoid other) => Orientation.Equals(other.Orientation) && Roughness.Equals(other.Roughness) && IncomingDirection.Equals(other.IncomingDirection);