Rendering Engine 0.2.0
Modular Graphics Rendering Engine | v0.2.0
Loading...
Searching...
No Matches
model_tests.cpp File Reference
#include <stdio.h>
#include <cstdint>
#include "gtest/gtest.h"
#include "../RenderingLibrary/Include/image_data.hpp"
#include "../RenderingLibrary/Include/model.hpp"
#include "../RenderingLibrary/Include/mesh.hpp"

Go to the source code of this file.

Functions

 TEST (ImageDataTest, ModelsLoading)

Function Documentation

◆ TEST()

TEST ( ImageDataTest ,
ModelsLoading  )

Definition at line 20 of file model_tests.cpp.

21{
22 std::string const modelFilepath{ "../Content/Models/TestCube/test_cube.fbx" };
23 std::string const textureFilepath{ "../Content/Models/TestCube/test_cube_color.png" };
24
25 ImageData textureImageData(textureFilepath);
26 textureImageData.GetHeight();
27
28 Model model(modelFilepath);
29 ASSERT_TRUE(model.HasMeshes());
30
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());
37}
Represents raw 2D image data stored in memory.
Represents a 3D model composed of multiple meshes and materials.
Definition model.hpp:30