Continue working on bounding boxes.

This commit is contained in:
Godzil
2020-02-25 09:20:38 +00:00
parent 3011544e8f
commit 831a096281
6 changed files with 71 additions and 7 deletions

View File

@@ -114,4 +114,15 @@ TEST(CubeTest, The_normal_on_the_surface_of_a_cube)
{
ASSERT_EQ(c.normalAt(HitPoints[i]), ExpectedNormals[i]);
}
}
TEST(Cube, The_bounding_box_of_a_cube)
{
Cube t = Cube();
BoundingBox b = BoundingBox(Point(-1, -1, -1), Point(1, 1, 1));
BoundingBox res = t.getBounds();
ASSERT_EQ(res.min, b.min);
ASSERT_EQ(res.max, b.max);
}