Loading...
Searching...
No Matches
hellfire::AssetManager Class Reference

#include <AssetManager.h>

Collaboration diagram for hellfire::AssetManager:

Public Member Functions

 AssetManager (AssetRegistry &registry)
 
std::shared_ptr< Meshget_mesh (AssetID id)
 
std::shared_ptr< Materialget_material (AssetID id)
 
std::shared_ptr< Textureget_texture (AssetID id)
 
void unload (AssetID id)
 
void clear_cache ()
 
void reload_modified ()
 
size_t get_loaded_mesh_count () const
 
size_t get_loaded_material_count () const
 
size_t get_loaded_texture_count () const
 

Private Attributes

AssetRegistryregistry_
 
std::unordered_map< AssetID, std::shared_ptr< Mesh > > mesh_cache_
 
std::unordered_map< AssetID, std::shared_ptr< Material > > material_cache_
 
std::unordered_map< AssetID, std::shared_ptr< Texture > > texture_cache_
 

Detailed Description

Definition at line 10 of file AssetManager.h.

Constructor & Destructor Documentation

◆ AssetManager()

hellfire::AssetManager::AssetManager ( AssetRegistry registry)
explicit

Definition at line 11 of file AssetManager.cpp.

Member Function Documentation

◆ clear_cache()

void hellfire::AssetManager::clear_cache ( )

Definition at line 104 of file AssetManager.cpp.

◆ get_loaded_material_count()

size_t hellfire::AssetManager::get_loaded_material_count ( ) const
inline

Definition at line 26 of file AssetManager.h.

◆ get_loaded_mesh_count()

size_t hellfire::AssetManager::get_loaded_mesh_count ( ) const
inline

Definition at line 25 of file AssetManager.h.

◆ get_loaded_texture_count()

size_t hellfire::AssetManager::get_loaded_texture_count ( ) const
inline

Definition at line 27 of file AssetManager.h.

◆ get_material()

std::shared_ptr< Material > hellfire::AssetManager::get_material ( AssetID  id)

Definition at line 40 of file AssetManager.cpp.

◆ get_mesh()

std::shared_ptr< Mesh > hellfire::AssetManager::get_mesh ( AssetID  id)

Definition at line 13 of file AssetManager.cpp.

◆ get_texture()

std::shared_ptr< Texture > hellfire::AssetManager::get_texture ( AssetID  id)

Definition at line 76 of file AssetManager.cpp.

◆ reload_modified()

void hellfire::AssetManager::reload_modified ( )

Definition at line 110 of file AssetManager.cpp.

◆ unload()

void hellfire::AssetManager::unload ( AssetID  id)

Definition at line 98 of file AssetManager.cpp.

Member Data Documentation

◆ material_cache_

std::unordered_map<AssetID, std::shared_ptr<Material> > hellfire::AssetManager::material_cache_
private

Definition at line 33 of file AssetManager.h.

◆ mesh_cache_

std::unordered_map<AssetID, std::shared_ptr<Mesh> > hellfire::AssetManager::mesh_cache_
private

Definition at line 32 of file AssetManager.h.

◆ registry_

AssetRegistry& hellfire::AssetManager::registry_
private

Definition at line 30 of file AssetManager.h.

◆ texture_cache_

std::unordered_map<AssetID, std::shared_ptr<Texture> > hellfire::AssetManager::texture_cache_
private

Definition at line 34 of file AssetManager.h.


The documentation for this class was generated from the following files: