[WIP] stripe-pattern is now ok.

This commit is contained in:
NADAL Jean-Baptiste
2024-02-29 18:39:45 +01:00
parent 5e540a995b
commit 0576ccaccb
19 changed files with 192 additions and 56 deletions

View File

@@ -331,7 +331,7 @@ SCENARIO("Lighting with the eye between the light and the surface", "[features/m
PointLight light = PointLight(Tuple::Point(0, 0, -10), Color(1, 1, 1));
WHEN("result <- lighting(m, light, position, eyev, normalv)")
{
Color result = m.lighting(light, position, eyev, normalv, false);
Color result = m.lighting(nullptr, light, position, eyev, normalv, false);
THEN("result = color(1.9, 1.9, 1.9)")
{
REQUIRE(result == Color(1.9, 1.9, 1.9));
@@ -360,7 +360,7 @@ SCENARIO("Lighting with eye between the light & surface, eye offset 45°", "[fea
PointLight light = PointLight(Tuple::Point(0, 0, -10), Color(1, 1, 1));
WHEN("result <- lighting(m, light, position, eyev, normalv)")
{
Color result = m.lighting(light, position, eyev, normalv, false);
Color result = m.lighting(nullptr, light, position, eyev, normalv, false);
THEN("result = color(1.0, 1.0, 1.0)")
{
REQUIRE(result == Color(1.0, 1.0, 1.0));
@@ -389,7 +389,7 @@ SCENARIO("Lighting with the eye opposite surface, light offset 45°", "[features
PointLight light = PointLight(Tuple::Point(0, 10, -10), Color(1, 1, 1));
WHEN("result <- lighting(m, light, position, eyev, normalv)")
{
Color result = m.lighting(light, position, eyev, normalv, false);
Color result = m.lighting(nullptr, light, position, eyev, normalv, false);
THEN("result = color(0.7364, 0.7364, 0.7364)")
{
REQUIRE(result == Color(0.7364, 0.7364, 0.7364));
@@ -418,7 +418,7 @@ SCENARIO("Lighting with the eye in the path of the reflection vector", "[feature
PointLight light = PointLight(Tuple::Point(0, 10, -10), Color(1, 1, 1));
WHEN("result <- lighting(m, light, position, eyev, normalv)")
{
Color result = m.lighting(light, position, eyev, normalv, false);
Color result = m.lighting(nullptr, light, position, eyev, normalv, false);
THEN("result = color(1.6364, 1.6364, 1.6364)")
{
REQUIRE(result == Color(1.6364, 1.6364, 1.6364));
@@ -447,7 +447,7 @@ SCENARIO("Lighting with the light behind the surface", "[features/materials.feat
PointLight light = PointLight(Tuple::Point(0, 0, 10), Color(1, 1, 1));
WHEN("result <- lighting(m, light, position, eyev, normalv)")
{
Color result = m.lighting(light, position, eyev, normalv, false);
Color result = m.lighting(nullptr, light, position, eyev, normalv, false);
THEN("result = color(0.1, 0.1, 0.1)")
{
REQUIRE(result == Color(0.1, 0.1, 0.1));