|
Vulkan Schnee 0.0.1
High-performance rendering engine
|
The model asset is used to bind together all files of one gtlf model. The idea is that textures, materials etc are bundled in one model. More...
#include <ModelAssetManager.h>
Public Member Functions | |
| ModelAsset (std::filesystem::path path) | |
| std::filesystem::path | getPath () const |
| Gets the models path on disc. | |
| void | registerCreatedAssetWithModel (Asset::AssetBase *asset) |
| Registers an asset like a texture or 3d model with this gltf model. | |
| void | unload () override |
| Unload overwrite which empties out the model data. | |
| Public Member Functions inherited from Asset::AssetBase | |
| AssetBase (bool initializeDefaultEntity=false) | |
| virtual | ~AssetBase () |
| CpuLoadingState | getLoadingState () |
| Gets the loading state of this asset. | |
| void | requestLoad () |
| If this asset is in the UNLOADED state it will get added to the assets to load. | |
| entt::entity | getEntity () const |
| Getter for data. | |
Protected Member Functions | |
| void | updateLoadingState () override |
| Updates the loading state based on whether all registered sub-assets are loaded. | |
Private Attributes | |
| std::filesystem::path | path |
| std::vector< Asset::AssetBase * > | assetsFromPath |
| std::optional< tinygltf::Model > | model |
Friends | |
| class | EngineCore::AssetManager |
| class | Ecs::ModelAssetPipeline |
Additional Inherited Members | |
| Protected Attributes inherited from Asset::AssetBase | |
| CpuLoadingState | loadingState = UNLOADED |
| entt::registry & | mainRegistry |
| entt::entity | data |
The model asset is used to bind together all files of one gtlf model. The idea is that textures, materials etc are bundled in one model.
Definition at line 20 of file ModelAssetManager.h.
|
explicit |
Definition at line 6 of file ModelAssetManager.cpp.
References path.
|
inlinenodiscard |
Gets the models path on disc.
Definition at line 33 of file ModelAssetManager.h.
References path.
| void EngineCore::ModelAsset::registerCreatedAssetWithModel | ( | Asset::AssetBase * | asset | ) |
Registers an asset like a texture or 3d model with this gltf model.
| asset | The asset to register with this model |
Definition at line 10 of file ModelAssetManager.cpp.
References assetsFromPath, and TRACY_ZONE_SCOPED_NAMED.
Referenced by Ecs::ModelAssetPipeline::processModel(), and Ecs::ModelAssetPipeline::processTextures().
|
overridevirtual |
Unload overwrite which empties out the model data.
Reimplemented from Asset::AssetBase.
Definition at line 15 of file ModelAssetManager.cpp.
References assetsFromPath, model, and path.
|
overrideprotectedvirtual |
Updates the loading state based on whether all registered sub-assets are loaded.
Reimplemented from Asset::AssetBase.
Definition at line 23 of file ModelAssetManager.cpp.
References assetsFromPath, Asset::LOADED, Asset::LOADING, Asset::AssetBase::loadingState, and Asset::UNLOADED.
|
friend |
Definition at line 22 of file ModelAssetManager.h.
References path.
|
friend |
Definition at line 21 of file ModelAssetManager.h.
|
private |
Definition at line 63 of file ModelAssetManager.h.
Referenced by registerCreatedAssetWithModel(), unload(), and updateLoadingState().
|
private |
Definition at line 64 of file ModelAssetManager.h.
Referenced by Ecs::ModelAssetPipeline::processModel(), Ecs::ModelAssetPipeline::processTextures(), and unload().
|
private |
Definition at line 62 of file ModelAssetManager.h.
Referenced by Ecs::ModelAssetPipeline, getPath(), ModelAsset(), Ecs::ModelAssetPipeline::processModel(), and unload().