Continue working on bounding boxes.
This commit is contained in:
@@ -207,4 +207,15 @@ TEST(SphereTest, A_helper_for_producing_a_sphere_with_a_glassy_material)
|
||||
ASSERT_EQ(s.transformMatrix, Matrix4().identity());
|
||||
ASSERT_EQ(s.material.transparency, 1.0);
|
||||
ASSERT_EQ(s.material.refractiveIndex, 1.5);
|
||||
}
|
||||
|
||||
TEST(SphereTest, The_bounding_box_of_a_sphere)
|
||||
{
|
||||
Sphere t = Sphere();
|
||||
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);
|
||||
}
|
||||
Reference in New Issue
Block a user