/// <summary> /// Determines whether the specified <see cref="MaterialPalette"/> is equal to the current <see cref="UFLT.Records.MaterialPalette"/>. /// </summary> /// <param name='other'> /// The <see cref="MaterialPalette"/> to compare with the current <see cref="UFLT.Records.MaterialPalette"/>. /// </param> /// <returns> /// <c>true</c> if the specified <see cref="MaterialPalette"/> is equal to the current /// <see cref="UFLT.Records.MaterialPalette"/>; otherwise, <c>false</c>. /// </returns> public bool Equals(MaterialPalette other) { // Check color fields if (!Ambient.Equals(other.Ambient)) { return(false); } if (!Diffuse.Equals(other.Diffuse)) { return(false); } if (!Specular.Equals(other.Specular)) { return(false); } if (!Emissive.Equals(other.Emissive)) { return(false); } if (Mathf.Approximately(Shininess, other.Shininess)) { return(false); } if (Mathf.Approximately(Alpha, other.Alpha)) { return(false); } return(true); }
public bool Equals(Material other) { return(Color.Equals(other.Color) && Ambient.Equals(other.Ambient) && Diffuse.Equals(other.Diffuse) && Specular.Equals(other.Specular) && Shininess.Equals(other.Shininess)); }
/// <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) )); }
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))); }
protected bool Equals(Material other) { return(Equals(Pattern, other.Pattern) && Ambient.Equals(other.Ambient) && Diffuse.Equals(other.Diffuse) && Specular.Equals(other.Specular) && Shininess == other.Shininess && Reflective.Equals(other.Reflective)); }