Nigel Barink
9165e30d0e
* Using import library assimp to incorrectly load a cube.obj * Using a temporary Renderable class as a placeholder for all data needed to render the mesh. * Vertex Array abstraction added
27 lines
812 B
C++
27 lines
812 B
C++
#pragma once
|
|
#define TINYGLTF_IMPLEMENTATION
|
|
#define STB_IMAGE_IMPLEMENTATION
|
|
#define STB_IMAGE_WRITE_IMPLEMENTATION
|
|
#define TINYGLTF_NO_EXTERNAL_IMAGE
|
|
|
|
#include <MyGraphicsEngine/Mesh.h>
|
|
#include <assimp/Importer.hpp>
|
|
#include <assimp/scene.h>
|
|
#include <assimp/postprocess.h>
|
|
#include <spdlog/spdlog.h>
|
|
#include <string>
|
|
|
|
class ModelImporter {
|
|
private:
|
|
void ImportFBX(std::string path);
|
|
void ImportBlend(std::string path);
|
|
void ImportGLTF(std::string path);
|
|
void ImportOBJ(std::string path);
|
|
static BarinkEngine::Mesh ModelImporter::processMesh(aiMesh* mesh, const aiScene* scene);
|
|
static std::vector<BarinkEngine::Mesh> ModelImporter::processNode(aiNode* node, const aiScene* scene);
|
|
|
|
public:
|
|
void Import(std::string path);
|
|
|
|
static std::vector<BarinkEngine::Mesh> Test();
|
|
}; |