public override bool Equals(object obj)
        {
            var other = obj as Material;

            return((other != null) &&
                   (Color.Equals(other.Color)) &&
                   (Ambient.IsEqual(other.Ambient)) &&
                   (Diffuse.IsEqual(other.Diffuse)) &&
                   (Specular.IsEqual(other.Specular)) &&
                   (Shininess.IsEqual(other.Shininess)) &&
                   (Reflective.IsEqual(other.Reflective)) &&
                   (Transparency.IsEqual(other.Transparency)) &&
                   (RefractiveIndex.IsEqual(other.RefractiveIndex)));
        }
Example #2
0
    //! 以下から屈折に関するもの
    float GetRefractiveIndex(RefractiveIndex index)
    {
        switch (index)
        {
        case RefractiveIndex.Air:
            return(1f);

        case RefractiveIndex.Water:
            return(1.333f);

        default:
            return(-1f);
        }
    }