Registry store for non-skinned geometry mesh handles.
More...
#include <AssetRegistry.h>
|
| struct | Record |
| | Stored metadata for one geometry mesh handle slot. More...
|
|
| static std::string | keyFor (const Asset::MeshPath &meshPath) |
| | Builds the deduplication key for a mesh source path and mesh name.
|
|
| AssetManager * | assetManager_ = nullptr |
| | Optional bridge used to request legacy mesh refs.
|
| std::vector< Record > | records_ |
| | Slot storage indexed by GeometryMeshHandle::index.
|
| std::unordered_map< std::string, uint32_t > | pathToIndex_ |
| | Deduplication map from keyFor() to slot index.
|
Registry store for non-skinned geometry mesh handles.
GeometryMeshStore maps authored mesh paths to stable GeometryMeshHandle values and tracks payload and residency generation counters used by loading systems.
Definition at line 91 of file AssetRegistry.h.
◆ GeometryMeshStore()
| Engine::Core::GeometryMeshStore::GeometryMeshStore |
( |
AssetManager * | assetManager = nullptr | ) |
|
|
explicit |
Creates a geometry mesh store backed by an optional asset manager.
- Parameters
-
| assetManager | Asset manager used to request mesh payload loads, or nullptr for handle-only use. |
◆ isValid()
Checks whether a geometry mesh handle refers to a live slot in this store.
- Parameters
-
| handle | Handle to validate. |
- Returns
- True when the handle index and generation match a stored record.
◆ keyFor()
| std::string Engine::Core::GeometryMeshStore::keyFor |
( |
const Asset::MeshPath & | meshPath | ) |
|
|
staticnodiscardprivate |
Builds the deduplication key for a mesh source path and mesh name.
- Parameters
-
| meshPath | Mesh source path and mesh name. |
- Returns
- Stable string key used by pathToIndex_.
◆ load()
Gets or creates a stable handle for a mesh path.
- Parameters
-
| meshPath | Engine-relative mesh path and mesh asset name. |
- Returns
- Existing or newly created geometry mesh handle.
- Exceptions
-
| std::invalid_argument | when meshPath contains an absolute source path. |
◆ path()
Returns the authored mesh path for a geometry mesh handle.
- Parameters
-
- Returns
- Pointer to the stored mesh path, or nullptr when the handle is invalid.
◆ setAssetManager()
| void Engine::Core::GeometryMeshStore::setAssetManager |
( |
AssetManager * | assetManager | ) |
|
Sets the asset manager used when new geometry handles request payload loading.
- Parameters
-
| assetManager | Asset manager to use, or nullptr to disable payload load requests. |
◆ assetManager_
| AssetManager* Engine::Core::GeometryMeshStore::assetManager_ = nullptr |
|
private |
Optional bridge used to request legacy mesh refs.
Definition at line 147 of file AssetRegistry.h.
◆ pathToIndex_
| std::unordered_map<std::string, uint32_t> Engine::Core::GeometryMeshStore::pathToIndex_ |
|
private |
Deduplication map from keyFor() to slot index.
Definition at line 149 of file AssetRegistry.h.
◆ records_
| std::vector<Record> Engine::Core::GeometryMeshStore::records_ |
|
private |
Slot storage indexed by GeometryMeshHandle::index.
Definition at line 148 of file AssetRegistry.h.
The documentation for this class was generated from the following file:
- /workspace/magerbeton/gl3-vulkan/code/Engine/include/Engine/Asset/AssetRegistry.h