#include <ModelLoader.h>
Classes | |
| struct | ImportFlags |
Static Public Member Functions | |
| static EntityID | load_model (Scene *scene, const std::filesystem::path &filepath, unsigned int import_flags=0) |
| static void | clear_cache () |
| static void | print_cache_stats () |
Private Types | |
| enum class | MaterialType { LAMBERT , PHONG , PBR } |
Static Private Member Functions | |
| static EntityID | process_node (Scene *scene, aiNode *node, const aiScene *ai_scene, const std::string &filepath, EntityID parent_id=0) |
| static bool | is_identity_transform (const aiMatrix4x4 &matrix) |
| static void | process_mesh_vertices (aiMesh *mesh, std::vector< Vertex > &vertices, std::vector< unsigned int > &indices) |
| static std::shared_ptr< Mesh > | process_mesh (aiMesh *mesh, const aiScene *scene, const std::string &filepath) |
| static void | preprocess_materials (const aiScene *scene, const std::string &filepath) |
| static std::shared_ptr< Material > | create_material (const aiMaterial *ai_material, const aiScene *scene, const std::string &filepath) |
| static void | load_essential_material_properties (const aiMaterial *ai_material, Material &material) |
| static void | load_material_textures (const aiMaterial *ai_material, Material &material, const aiScene *scene, const std::string &filepath) |
| static bool | try_load_embedded_texture_unified (const std::string &path_str, const aiScene *scene, TextureType type, Material &material) |
| static bool | try_load_external_texture_unified (const std::string &path_str, const std::string &filepath, TextureType type, Material &material) |
| static bool | try_load_embedded_texture (const std::string &path_str, const aiScene *scene, TextureType dcr_type, Material &material, const std::string &property_name) |
| static bool | try_load_external_texture (const std::string &path_str, const std::string &filepath, TextureType dcr_type, Material &material, const std::string &property_name) |
| static std::shared_ptr< Texture > | load_cached_texture (const std::string &path, TextureType type) |
| static std::string | create_mesh_key (aiMesh *mesh, const std::string &filepath) |
| static std::string | create_material_key (const aiMaterial *ai_material, const std::string &filepath, unsigned int material_index) |
| static std::string | capitalize_first (const std::string &str) |
| static void | debug_scene_info (const aiScene *scene, const std::string &filepath) |
| static std::vector< std::string > | get_texture_search_paths (const std::string &filepath) |
Static Private Attributes | |
| static std::unordered_map< std::string, std::shared_ptr< Mesh > > | mesh_cache |
| static std::unordered_map< std::string, std::shared_ptr< Material > > | material_cache |
| static std::unordered_map< std::string, std::shared_ptr< Texture > > | texture_cache |
Definition at line 22 of file ModelLoader.h.
|
strongprivate |
| Enumerator | |
|---|---|
| LAMBERT | |
| PHONG | |
| PBR | |
Definition at line 72 of file ModelLoader.h.
|
staticprivate |
Definition at line 552 of file ModelLoader.cpp.
|
static |
Definition at line 559 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 320 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 289 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 285 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 64 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 379 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 221 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 532 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 340 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 395 of file ModelLoader.cpp.
|
static |
Definition at line 25 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 82 of file ModelLoader.cpp.
|
static |
Definition at line 566 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 297 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 231 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 126 of file ModelLoader.cpp.
|
staticprivate |
|
staticprivate |
Definition at line 428 of file ModelLoader.cpp.
|
staticprivate |
|
staticprivate |
Definition at line 498 of file ModelLoader.cpp.
|
staticprivate |
Definition at line 135 of file ModelLoader.h.
|
staticprivate |
Definition at line 134 of file ModelLoader.h.
|
staticprivate |
Definition at line 136 of file ModelLoader.h.