19#include <assimp/postprocess.h>
20#include <assimp/scene.h>
26#include <assimp/IOStream.hpp>
27#include <assimp/IOSystem.hpp>
28#include <assimp/Importer.hpp>
47 size_t Read(
void* pvBuffer,
size_t pSize,
size_t pCount);
48 size_t Write(
const void* pvBuffer,
size_t pSize,
size_t pCount) {
51 aiReturn
Seek(
size_t pOffset, aiOrigin pOrigin);
69 Assimp::IOStream*
Open(
const char* pFile,
const char* pMode)
override;
70 void Close(Assimp::IOStream* pFile)
override;
Definition: assetprototype.h:37
Definition: modelloader.h:38
size_t Tell() const
Definition: modelloader.cpp:91
void Flush()
Definition: modelloader.cpp:93
size_t FileSize() const
Definition: modelloader.cpp:92
void Close()
Definition: modelloader.cpp:62
size_t Write(const void *pvBuffer, size_t pSize, size_t pCount)
Definition: modelloader.h:48
aiReturn Seek(size_t pOffset, aiOrigin pOrigin)
Definition: modelloader.cpp:73
IVirtualFilePtr ivfp
Definition: modelloader.h:44
IOStream(IVirtualFilePtr _ivfp)
Definition: modelloader.h:42
size_t Read(void *pvBuffer, size_t pSize, size_t pCount)
Definition: modelloader.cpp:64
Definition: modelloader.h:59
Assimp::IOStream * Open(const char *pFile, const char *pMode) override
Definition: modelloader.cpp:44
IOSystem(VirtualMounter *mount)
Definition: modelloader.cpp:37
void Close(Assimp::IOStream *pFile) override
Definition: modelloader.cpp:40
bool Exists(const char *file) const override
Definition: modelloader.cpp:38
char getOsSeparator() const override
Definition: modelloader.h:67
VirtualMounter * mount
Definition: modelloader.h:60
lib tracy file(GLOB_RECURSE CPP_FILES *.cpp) list(FILTER CPP_FILES EXCLUDE REGEX ".*main.cpp$") file(GLOB_RECURSE H_FILES *.h) set(SOURCE_FILES $
Definition: CMakeLists.txt:22
void LoadModelPrototype(ModelPrototype *prototype, Model *asset)
Definition: modelloader.cpp:153
void LoadModelData(engine::Mesh *mesh, std::vector< Vertex > &vertices, std::vector< unsigned int > &indices)
Definition: modelloader.cpp:190
@ MODEL
Model prototype.
Definition: assetprototype.h:30
std::shared_ptr< IVirtualFile > IVirtualFilePtr
Definition: vfs.h:34
Definition: modelloader.h:88
glm::vec3 base_emissive
Definition: modelloader.h:97
glm::vec3 base_ambient
Definition: modelloader.h:96
glm::vec3 base_diffuse
Definition: modelloader.h:94
glm::vec3 base_specular
Definition: modelloader.h:95
std::vector< std::string > height
Definition: modelloader.h:92
glm::vec3 base_transparent
Definition: modelloader.h:98
std::vector< std::string > ambient
Definition: modelloader.h:91
std::vector< std::string > specular
Definition: modelloader.h:90
std::vector< std::string > diffuse
Definition: modelloader.h:89
Definition: modelloader.h:73
std::vector< unsigned int > indices
Definition: modelloader.h:75
std::vector< Vertex > vertices
Definition: modelloader.h:74
std::vector< std::string > textures
Definition: modelloader.h:76
int material_id
Definition: modelloader.h:77
Definition: modelloader.h:109
int m_count
Definition: modelloader.h:110
void LoadMaterial(int idx, aiMaterial *material)
Definition: modelloader.cpp:309
ModelLoader(const aiScene *_scene, std::string asset_path)
Definition: modelloader.h:114
ModelPrototype * model_prototype
Definition: modelloader.h:111
const aiScene * scene
Definition: modelloader.h:112
std::string asset_path
Definition: modelloader.h:113
void LoadMesh(aiMesh *mesh)
Definition: modelloader.cpp:254
void LoadMaterials()
Definition: modelloader.cpp:299
void LoadModel()
Definition: modelloader.cpp:235
void LoadNode(aiNode *node)
Definition: modelloader.cpp:240
void LoadMaterialTextures(aiMaterial *material, const aiTextureType &type, MaterialPrototype &prototype)
Definition: modelloader.cpp:194
Definition: modelloader.h:101
int GetPrototypeType()
Definition: modelloader.h:106
std::vector< MeshPrototype > prototypes
Definition: modelloader.h:103
std::map< std::string, ModelTexturePrototype > texture_map
Definition: modelloader.h:104
std::map< int, MaterialPrototype > material_map
Definition: modelloader.h:105
Definition: modelloader.h:80
int height
Definition: modelloader.h:82
int width
Definition: modelloader.h:81
unsigned char * texture_data
Definition: modelloader.h:85
int channels
Definition: modelloader.h:83