TEST(BBoxTest, mergedWithBBox) { const BBox3f bounds1(Vec3f(-12.0f, -3.0f, 4.0f), Vec3f(7.0f, 8.0f, 9.0f)); const BBox3f bounds2(Vec3f(-10.0f, -5.0f, 3.0f), Vec3f(9.0f, 9.0f, 5.0f)); const BBox3f merged( Vec3f(-12.0f, -5.0f, 3.0f), Vec3f(9.0f, 9.0f, 9.0f)); ASSERT_EQ(merged, bounds1.mergedWith(bounds2)); }
TEST(BBoxTest, mergedWithVec) { const BBox3f bounds(Vec3f(-12.0f, -3.0f, 4.0f), Vec3f(7.0f, 8.0f, 9.0f)); const Vec3f vec(-10.0f, -6.0f, 10.0f); const BBox3f merged(Vec3f(-12.0f, -6.0f, 4.0f), Vec3f(7.0f, 8.0f, 10.0f)); ASSERT_EQ(merged, bounds.mergedWith(vec)); }