| 6 | namespace clio { |
| 7 | |
| 8 | TEST(IntersectionPolicy, TestOverlap) { |
| 9 | OverlapIntersection::Config config; |
| 10 | config.tolerance = 0.0; |
| 11 | OverlapIntersection checker(config); |
| 12 | |
| 13 | KhronosObjectAttributes attrs1; |
| 14 | attrs1.bounding_box.min << 1.0f, 1.0f, 1.0f; |
| 15 | attrs1.bounding_box.max << 2.0f, 2.0f, 2.0f; |
| 16 | |
| 17 | KhronosObjectAttributes attrs2; |
| 18 | attrs2.bounding_box.min << 3.0f, 3.0f, 3.0f; |
| 19 | attrs2.bounding_box.max << 4.0f, 4.0f, 4.0f; |
| 20 | |
| 21 | EXPECT_FALSE(checker(attrs1, attrs2)); |
| 22 | |
| 23 | // make sure the two bounding boxes overlap |
| 24 | attrs1.bounding_box.max << 3.5f, 3.5f, 3.5f; |
| 25 | EXPECT_TRUE(checker(attrs1, attrs2)); |
| 26 | } |
| 27 | |
| 28 | struct ObjectUpdateFunctorTests : public ::testing::Test { |
| 29 | ObjectUpdateFunctorTests() |
nothing calls this directly
no outgoing calls
no test coverage detected