Skip to content

Commit

Permalink
update test
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Mar 14, 2024
1 parent 511d977 commit 665301e
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions graphics/src/MeshManager_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -310,16 +310,18 @@ TEST_F(MeshManager, ConvexDecomposition)
EXPECT_EQ(8u, boxSubmesh.NormalCount());
EXPECT_EQ(36u, boxSubmesh.IndexCount());

std::size_t maxConvexHulls = 4;
std::size_t resolution = 1000;
const common::Mesh *drillMesh = mgr->Load(
common::testing::TestFile("data", "cordless_drill",
"meshes", "cordless_drill.dae"));
EXPECT_EQ(1u, drillMesh->SubMeshCount());
decomposed = mgr->ConvexDecomposition(
drillMesh->SubMeshByIndex(0u).lock().get());
drillMesh->SubMeshByIndex(0u).lock().get(), maxConvexHulls, resolution);

// A drill should be decomposed into multiple submeshes
EXPECT_LT(1u, decomposed.size());
EXPECT_GE(32u, decomposed.size());
EXPECT_GE(maxConvexHulls, decomposed.size());
// Check submeshes are not empty
for (const auto &d : decomposed)
{
Expand All @@ -330,5 +332,4 @@ TEST_F(MeshManager, ConvexDecomposition)
}
}


#endif

0 comments on commit 665301e

Please sign in to comment.