예제 #1
0
        public void InShadowWhenAnObjectIsBetweenLightAndPoint()
        {
            var w = World.Default();
            var p = new Point(10, -10, 10);

            PhongShading.IsShadowed(w, p, w.Lights[0].Position).Should().BeTrue();
        }
예제 #2
0
        public void NotInShadowWhenObjectIsBehindPoint()
        {
            var w = World.Default();
            var p = new Point(-2, 2, -2);

            PhongShading.IsShadowed(w, p, w.Lights[0].Position).Should().BeFalse();
        }
예제 #3
0
        public void NotInShadowWhenNothingBetweenLightAndPoint()
        {
            var w = World.Default();
            var p = new Point(0, 10, 0);

            PhongShading.IsShadowed(w, p, w.Lights[0].Position).Should().BeFalse();
        }