Add mesh bounds metadata
This commit is contained in:
@@ -60,6 +60,10 @@ TEST(MeshLoader, LoadValidObjMesh) {
|
||||
EXPECT_TRUE(HasVertexAttribute(mesh->GetVertexAttributes(), VertexAttribute::Position));
|
||||
EXPECT_TRUE(HasVertexAttribute(mesh->GetVertexAttributes(), VertexAttribute::Normal));
|
||||
EXPECT_TRUE(HasVertexAttribute(mesh->GetVertexAttributes(), VertexAttribute::UV0));
|
||||
EXPECT_EQ(mesh->GetBounds().GetMin(), XCEngine::Math::Vector3(0.0f, 0.0f, -1.0f));
|
||||
EXPECT_EQ(mesh->GetBounds().GetMax(), XCEngine::Math::Vector3(1.0f, 1.0f, -1.0f));
|
||||
EXPECT_EQ(mesh->GetSections()[0].bounds.GetMin(), XCEngine::Math::Vector3(0.0f, 0.0f, -1.0f));
|
||||
EXPECT_EQ(mesh->GetSections()[0].bounds.GetMax(), XCEngine::Math::Vector3(1.0f, 1.0f, -1.0f));
|
||||
|
||||
const auto* vertices = static_cast<const StaticMeshVertex*>(mesh->GetVertexData());
|
||||
ASSERT_NE(vertices, nullptr);
|
||||
|
||||
Reference in New Issue
Block a user