Started working on boundingboxes.

This commit is contained in:
Godzil
2020-02-24 18:03:25 +00:00
parent d1965caf8d
commit 3011544e8f
13 changed files with 114 additions and 3 deletions

View File

@@ -163,4 +163,15 @@ TEST(TestShape, Finding_the_normal_on_a_child_object)
ASSERT_EQ(p, Vector(0.2857, 0.4286, -0.8571));
set_equal_precision(FLT_EPSILON);
}
}
TEST(TestShape, Test_the_bouding_box_of_the_test_shape)
{
TestShape t = TestShape();
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);
}