Skip to content

Commit

Permalink
add test
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <ichen@openrobotics.org>
  • Loading branch information
iche033 committed May 29, 2024
1 parent 5dc81d8 commit bcb575a
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/Util_TEST.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1023,4 +1023,12 @@ TEST_F(UtilTest, LoadMesh)
"test", "media", "duck.dae");
meshSdf.SetFilePath(filePath);
EXPECT_NE(nullptr, loadMesh(meshSdf));

EXPECT_TRUE(meshSdf.SetOptimization("convex_decomposition"));
sdf::ConvexDecomposition convexDecomp;
convexDecomp.SetMaxConvexHulls(16u);
meshSdf.SetConvexDecomposition(convexDecomp);
auto *optimizedMesh = loadMesh(meshSdf);
EXPECT_NE(nullptr, optimizedMesh);
EXPECT_EQ(16u, optimizedMesh->SubMeshCount());
}

0 comments on commit bcb575a

Please sign in to comment.