[FEAT] Add Plane Chapter 09 is done
This commit is contained in:
@@ -234,7 +234,7 @@ SCENARIO("An intersection encapsulates t and object", "[features/intersections.f
|
||||
Sphere s;
|
||||
WHEN("intersection(3.5,s)")
|
||||
{
|
||||
Intersection i(3.5, s);
|
||||
Intersection i(3.5, &s);
|
||||
|
||||
THEN("i.t = 3.5")
|
||||
{
|
||||
@@ -257,7 +257,7 @@ SCENARIO("An intersection could be affected", "[features/intersections.feature]"
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(3.5,s) and i2 <- intersection()")
|
||||
{
|
||||
Intersection i1(3.5, s);
|
||||
Intersection i1(3.5, &s);
|
||||
Intersection i2;
|
||||
|
||||
WHEN("i2 <- i1")
|
||||
@@ -286,8 +286,8 @@ SCENARIO("Intersection could be compared", "[features/intersections.feature]")
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(3,s) and i2 <- intersection(4,s)")
|
||||
{
|
||||
Intersection i1(3.0, s);
|
||||
Intersection i2(4.0, s);
|
||||
Intersection i1(3.0, &s);
|
||||
Intersection i2(4.0, &s);
|
||||
|
||||
THEN("i2 > i1")
|
||||
{
|
||||
@@ -326,10 +326,10 @@ SCENARIO("Aggregating intersections", "[features/intersections.feature]")
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(1,s)")
|
||||
{
|
||||
Intersection i1(1, s);
|
||||
Intersection i1(1, &s);
|
||||
AND_GIVEN("i2 <- intersection(2,s)")
|
||||
{
|
||||
Intersection i2(2, s);
|
||||
Intersection i2(2, &s);
|
||||
WHEN("xs <- intersections(i1,i2)")
|
||||
{
|
||||
Intersections xs = Intersections({i1, i2});
|
||||
@@ -361,7 +361,7 @@ SCENARIO("Operations with intersections", "[features/intersections.feature]")
|
||||
AND_GIVEN("s <- sphere()")
|
||||
{
|
||||
Sphere s;
|
||||
Intersection i1(1, s);
|
||||
Intersection i1(1, &s);
|
||||
AND_GIVEN("xs2 <- intersections({i1})")
|
||||
{
|
||||
Intersections xs2({i1});
|
||||
@@ -423,10 +423,10 @@ SCENARIO("The hit, when all intersections have positive t", "[features/intersect
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(1,s)")
|
||||
{
|
||||
Intersection i1(1, s);
|
||||
Intersection i1(1, &s);
|
||||
AND_GIVEN("i2 <- intersection(2,s)")
|
||||
{
|
||||
Intersection i2(2, s);
|
||||
Intersection i2(2, &s);
|
||||
AND_GIVEN("xs <- intersections(i1,i2)")
|
||||
{
|
||||
Intersections xs = Intersections({i2, i1});
|
||||
@@ -453,10 +453,10 @@ SCENARIO("The hit, when some intersections have negative t", "[features/intersec
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(-1,s)")
|
||||
{
|
||||
Intersection i1(-1, s);
|
||||
Intersection i1(-1, &s);
|
||||
AND_GIVEN("i2 <- intersection(2,s)")
|
||||
{
|
||||
Intersection i2(1, s);
|
||||
Intersection i2(1, &s);
|
||||
AND_GIVEN("xs <- intersections(i1,i2)")
|
||||
{
|
||||
Intersections xs = Intersections({i2, i1});
|
||||
@@ -483,10 +483,10 @@ SCENARIO("The hit, when all intersections have negative t", "[features/intersect
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(-2,s)")
|
||||
{
|
||||
Intersection i1(-2, s);
|
||||
Intersection i1(-2, &s);
|
||||
AND_GIVEN("i2 <- intersection(-1,s)")
|
||||
{
|
||||
Intersection i2(-1, s);
|
||||
Intersection i2(-1, &s);
|
||||
AND_GIVEN("xs <- intersections(i1,i2)")
|
||||
{
|
||||
Intersections xs = Intersections({i1, i2});
|
||||
@@ -514,16 +514,16 @@ SCENARIO("The hit is always the lowest nonnegative intersection", "[features/int
|
||||
Sphere s;
|
||||
AND_GIVEN("i1 <- intersection(5,s)")
|
||||
{
|
||||
Intersection i1(5, s);
|
||||
Intersection i1(5, &s);
|
||||
AND_GIVEN("i2 <- intersection(7,s)")
|
||||
{
|
||||
Intersection i2(7, s);
|
||||
Intersection i2(7, &s);
|
||||
AND_GIVEN("i3 <- intersection(-3,s)")
|
||||
{
|
||||
Intersection i3(-3, s);
|
||||
Intersection i3(-3, &s);
|
||||
AND_GIVEN("i4 <- intersection(2,s)")
|
||||
{
|
||||
Intersection i4(2, s);
|
||||
Intersection i4(2, &s);
|
||||
AND_GIVEN("xs <- intersections(i1, i2, i3, i4)")
|
||||
{
|
||||
Intersections xs = Intersections({i1, i2, i3, i4});
|
||||
|
||||
Reference in New Issue
Block a user