YoggieEngine/BarinkEngine/Include/AssetManager/ModelImporter.h

23 lines
597 B
C
Raw Permalink Normal View History

#pragma once
#define TINYGLTF_IMPLEMENTATION
#define STB_IMAGE_IMPLEMENTATION
#define STB_IMAGE_WRITE_IMPLEMENTATION
#define TINYGLTF_NO_EXTERNAL_IMAGE
#include "Graphics/Mesh.h"
#include <assimp/Importer.hpp>
#include <assimp/scene.h>
#include <assimp/postprocess.h>
#include <string>
class ModelImporter {
2022-06-19 18:01:31 +00:00
public:
static std::vector<BarinkEngine::Mesh> Import(std::string path);
private:
static BarinkEngine::Mesh ModelImporter::processMesh(aiMesh* mesh, const aiScene* scene);
static std::vector<BarinkEngine::Mesh> ModelImporter::processNode(aiNode* node, const aiScene* scene);
};