Add mesh bounds metadata

This commit is contained in:
2026-03-26 03:26:44 +08:00
parent cb05472205
commit 6f1cbbf305
5 changed files with 48 additions and 0 deletions

View File

@@ -71,4 +71,15 @@ TEST(Mesh, AddSection) {
EXPECT_EQ(mesh.GetSections()[0].materialID, 2u);
}
TEST(Mesh, SetBounds) {
Mesh mesh;
Bounds bounds;
bounds.SetMinMax(Vector3(-1.0f, -2.0f, -3.0f), Vector3(1.0f, 2.0f, 3.0f));
mesh.SetBounds(bounds);
EXPECT_EQ(mesh.GetBounds().GetMin(), Vector3(-1.0f, -2.0f, -3.0f));
EXPECT_EQ(mesh.GetBounds().GetMax(), Vector3(1.0f, 2.0f, 3.0f));
}
} // namespace