Vulkan Schnee 0.0.1
High-performance rendering engine
Loading...
Searching...
No Matches
Engine::Core::GltfStore Class Reference

#include <AssetRegistry.h>

Collaboration diagram for Engine::Core::GltfStore:

Classes

struct  GltfRecord
struct  RenderableRecord

Public Member Functions

 GltfStore (AssetManager *assetManager=nullptr, GeometryMeshStore *geometryMeshes=nullptr, MaterialStore *materials=nullptr)
void setAssetManager (AssetManager *assetManager)
void setGeometryMeshStore (GeometryMeshStore *geometryMeshes)
void setMaterialStore (MaterialStore *materials)
Assets::GltfHandle load (const std::filesystem::path &source)
Assets::GltfRenderableHandle renderable (Assets::GltfHandle gltf, std::string_view nodeName)
Assets::GeometryMeshHandle geometryMesh (Assets::GltfRenderableHandle renderable) const
const GltfRenderableRecordget (Assets::GltfRenderableHandle renderable) const
const std::filesystem::path * sourcePath (Assets::GltfHandle gltf) const
bool isValid (Assets::GltfHandle handle) const
bool isValid (Assets::GltfRenderableHandle handle) const

Private Member Functions

void importMetadata (Assets::GltfHandle gltf)

Static Private Member Functions

static std::string keyFor (const std::filesystem::path &source)
static std::string fallbackNodeName (size_t nodeIndex)

Private Attributes

AssetManagerassetManager_ = nullptr
GeometryMeshStoregeometryMeshes_ = nullptr
MaterialStorematerials_ = nullptr
std::vector< GltfRecordgltfRecords_
std::vector< RenderableRecordrenderableRecords_
std::unordered_map< std::string, uint32_t > sourceToIndex_

Detailed Description

Definition at line 163 of file AssetRegistry.h.

Constructor & Destructor Documentation

◆ GltfStore()

Engine::Core::GltfStore::GltfStore ( AssetManager * assetManager = nullptr,
GeometryMeshStore * geometryMeshes = nullptr,
MaterialStore * materials = nullptr )

Member Function Documentation

◆ fallbackNodeName()

std::string Engine::Core::GltfStore::fallbackNodeName ( size_t nodeIndex)
staticnodiscardprivate

◆ geometryMesh()

Assets::GeometryMeshHandle Engine::Core::GltfStore::geometryMesh ( Assets::GltfRenderableHandle renderable) const
nodiscard

References renderable().

Here is the call graph for this function:

◆ get()

const GltfRenderableRecord * Engine::Core::GltfStore::get ( Assets::GltfRenderableHandle renderable) const
nodiscard

References renderable().

Here is the call graph for this function:

◆ importMetadata()

void Engine::Core::GltfStore::importMetadata ( Assets::GltfHandle gltf)
private

◆ isValid() [1/2]

bool Engine::Core::GltfStore::isValid ( Assets::GltfHandle handle) const
nodiscard

◆ isValid() [2/2]

bool Engine::Core::GltfStore::isValid ( Assets::GltfRenderableHandle handle) const
nodiscard

◆ keyFor()

std::string Engine::Core::GltfStore::keyFor ( const std::filesystem::path & source)
staticnodiscardprivate

◆ load()

Assets::GltfHandle Engine::Core::GltfStore::load ( const std::filesystem::path & source)
nodiscard

Referenced by Engine::Entities::Scene::spawnAll().

Here is the caller graph for this function:

◆ renderable()

Assets::GltfRenderableHandle Engine::Core::GltfStore::renderable ( Assets::GltfHandle gltf,
std::string_view nodeName )
nodiscard

Referenced by geometryMesh(), and get().

Here is the caller graph for this function:

◆ setAssetManager()

void Engine::Core::GltfStore::setAssetManager ( AssetManager * assetManager)

◆ setGeometryMeshStore()

void Engine::Core::GltfStore::setGeometryMeshStore ( GeometryMeshStore * geometryMeshes)

◆ setMaterialStore()

void Engine::Core::GltfStore::setMaterialStore ( MaterialStore * materials)

◆ sourcePath()

const std::filesystem::path * Engine::Core::GltfStore::sourcePath ( Assets::GltfHandle gltf) const
nodiscard

Member Data Documentation

◆ assetManager_

AssetManager* Engine::Core::GltfStore::assetManager_ = nullptr
private

Definition at line 209 of file AssetRegistry.h.

◆ geometryMeshes_

GeometryMeshStore* Engine::Core::GltfStore::geometryMeshes_ = nullptr
private

Definition at line 210 of file AssetRegistry.h.

◆ gltfRecords_

std::vector<GltfRecord> Engine::Core::GltfStore::gltfRecords_
private

Definition at line 212 of file AssetRegistry.h.

◆ materials_

MaterialStore* Engine::Core::GltfStore::materials_ = nullptr
private

Definition at line 211 of file AssetRegistry.h.

◆ renderableRecords_

std::vector<RenderableRecord> Engine::Core::GltfStore::renderableRecords_
private

Definition at line 213 of file AssetRegistry.h.

◆ sourceToIndex_

std::unordered_map<std::string, uint32_t> Engine::Core::GltfStore::sourceToIndex_
private

Definition at line 214 of file AssetRegistry.h.


The documentation for this class was generated from the following file:
  • /home/magerbeton/Documents/gl3-vulkan/Engine/include/Engine/Asset/AssetRegistry.h