MCPcopy Create free account
hub / github.com/MeshInspector/MeshLib / TEST

Function TEST

source/MRTest/MRAABBTreePointsTests.cpp:9–27  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7{
8
9TEST( 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
29TEST( MRMesh, AABBTreePointsFromMesh )
30{

Callers

nothing calls this directly

Calls 10

meshToPointCloudFunction · 0.85
makeUVSphereFunction · 0.85
getNumNodesPointsFunction · 0.85
rootNodeIdFunction · 0.85
countMethod · 0.80
sizeMethod · 0.45
includeMethod · 0.45
validMethod · 0.45
emptyMethod · 0.45
numValidVertsMethod · 0.45

Tested by

no test coverage detected