3#include "gtest/gtest.h"
9using ::testing::EmptyTestEventListener;
10using ::testing::InitGoogleTest;
12using ::testing::TestEventListeners;
13using ::testing::TestInfo;
14using ::testing::TestPartResult;
15using ::testing::TestSuite;
16using ::testing::UnitTest;
20TEST(ImageDataTest, ModelsLoading)
22 std::string
const modelFilepath{
"../Content/Models/TestCube/test_cube.fbx" };
23 std::string
const textureFilepath{
"../Content/Models/TestCube/test_cube_color.png" };
25 ImageData textureImageData(textureFilepath);
28 Model model(modelFilepath);
31 auto const meshName = model.
Meshes().at(0)->Name();
32 auto const vertices = model.
Meshes().at(0)->Vertices();
33 auto const indices = model.
Meshes().at(0)->Indices();
34 auto const normals = model.
Meshes().at(0)->Normals();
35 auto const texCoord = model.
Meshes().at(0)->TextureCoordinates();
36 EXPECT_NE(0, vertices.size());
Represents raw 2D image data stored in memory.
unsigned int GetHeight() const
Returns the image height.
Represents a 3D model composed of multiple meshes and materials.
bool HasMeshes() const
Checks whether this model contains any meshes.
const std::vector< std::shared_ptr< Mesh > > & Meshes() const
Returns the list of meshes belonging to this model.
TEST(ImageDataTest, ModelsLoading)