Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
ModelAssetManager.h
Go to the documentation of this file.
1#pragma once
2#include "Engine/Core/Asset.h"
3#include <tiny_gltf.h>
4#include <filesystem>
5
6namespace Ecs {
8}
9
10namespace EngineCore {
11 class AssetManager;
12
23
24 public:
25 explicit ModelAsset(std::filesystem::path path);
26
33 [[nodiscard]] std::filesystem::path getPath() const { return path; }
34
43
50 void unload() override;
51
52 protected:
59 void updateLoadingState() override;
60
61 private:
62 std::filesystem::path path;
63 std::vector<Asset::AssetBase*> assetsFromPath;
64 std::optional<tinygltf::Model> model; // only present during loading phase
65 };
66
67 class ModelAssetManager : public Asset::AssetManager<std::filesystem::path, ModelAsset> {
68 public:
70 };
71}
Base class for asset wrappers. The data is stored in the private member variable 'data' in form of en...
Definition Asset.h:50
A manager which is used to look up existing assets and their loading state.
Definition Asset.h:141
The model asset pipeline loads a gltf scene and loads and loads the mesh and material data....
ModelAsset(std::filesystem::path path)
void registerCreatedAssetWithModel(Asset::AssetBase *asset)
Registers an asset like a texture or 3d model with this gltf model.
std::optional< tinygltf::Model > model
void unload() override
Unload overwrite which empties out the model data.
void updateLoadingState() override
Updates the loading state based on whether all registered sub-assets are loaded.
std::filesystem::path path
std::vector< Asset::AssetBase * > assetsFromPath
std::filesystem::path getPath() const
Gets the models path on disc.
Data structs for the Entity Component System.
Log category system implementation.