More bounding boxes

This commit is contained in:
Godzil
2020-02-28 18:33:59 +00:00
parent b4ae737b40
commit 307c125eba
19 changed files with 92 additions and 55 deletions

View File

@@ -212,12 +212,13 @@ TEST(SphereTest, A_helper_for_producing_a_sphere_with_a_glassy_material)
TEST(SphereTest, The_bounding_box_of_a_sphere)
{
Sphere t = Sphere();
BoundingBox b = BoundingBox(Point(-1, -1, -1), Point(1, 1, 1));
Tuple sphereMin = Point(-1, -1, -1);
Tuple sphereMax = Point(1, 1, 1);
BoundingBox res = t.getBounds();
ASSERT_EQ(res.min, b.min);
ASSERT_EQ(res.max, b.max);
ASSERT_EQ(res.min, sphereMin);
ASSERT_EQ(res.max, sphereMax);
}
TEST(SphereTest, A_sphere_have_finite_bounds)