MCPcopy Create free account
hub / github.com/Geode-solutions/OpenGeode / test_other_intersections

Function test_other_intersections

tests/geometry/test-aabb.cpp:452–472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

450
451template < geode::index_t dimension >
452void test_other_intersections()
453{
454 geode::Logger::info(
455 "TEST", " Box other intersection AABB ", dimension, "D " );
456
457 geode::AABBTree< dimension > aabb{ create_box_vector< dimension >(
458 5, 0.2 ) };
459 const geode::AABBTree< dimension > other{ create_box_vector< dimension >(
460 2, 0.4 ) };
461 OtherAABBIntersection< dimension > action;
462 aabb.compute_other_element_bbox_intersections( other, action );
463
464 absl::flat_hash_map< geode::index_t, geode::index_t > answer{ { 0, 0 },
465 { 1, 1 }, { 5, 2 }, { 6, 3 } };
466 for( const auto& result : action.included_box_ )
467 {
468 geode::OpenGeodeGeometryException::test(
469 answer.at( result.first ) == result.second,
470 "Box other intersection - Wrong box result" );
471 }
472}
473
474template < geode::index_t dimension >
475void do_test()

Callers

nothing calls this directly

Calls 4

infoFunction · 0.85
atMethod · 0.80
testFunction · 0.70

Tested by

no test coverage detected