| 7 | { |
| 8 | |
| 9 | TEST( MRMesh, AABBTreePoints ) |
| 10 | { |
| 11 | PointCloud spherePC = meshToPointCloud( makeUVSphere( 1, 8, 8 ) ); |
| 12 | AABBTreePoints tree( spherePC ); |
| 13 | EXPECT_EQ( tree.nodes().size(), getNumNodesPoints( int( spherePC.validPoints.count() ) ) ); |
| 14 | |
| 15 | Box3f box; |
| 16 | for ( auto v : spherePC.validPoints ) |
| 17 | box.include( spherePC.points[v] ); |
| 18 | |
| 19 | EXPECT_EQ( tree[AABBTreePoints::rootNodeId()].box, box ); |
| 20 | |
| 21 | EXPECT_TRUE( tree[AABBTreePoints::rootNodeId()].l.valid() ); |
| 22 | EXPECT_TRUE( tree[AABBTreePoints::rootNodeId()].r.valid() ); |
| 23 | |
| 24 | assert( !tree.nodes().empty() ); |
| 25 | auto m = std::move( tree ); |
| 26 | assert( tree.nodes().empty() ); |
| 27 | } |
| 28 | |
| 29 | TEST( MRMesh, AABBTreePointsFromMesh ) |
| 30 | { |
nothing calls this directly
no test coverage detected