Vulkan Schnee 0.0.1 (22840dc8)
High-performance rendering engine
Loading...
Searching...
No Matches
AssetRegistry.h
1#pragma once
2
3#include "Engine/Asset/AssetHandles.h"
4#include "Engine/Asset/AssetRefs.h"
5#include "Engine/Audio/AudioAssetRef.h"
6#include "Engine/Ecs/EcsData.h"
7#include "Engine/Files/AssetPath.h"
8#include "Engine/Material/MaterialAssetRef.h"
9#include "Engine/Mesh/MeshAssetRef.h"
10#include "Engine/Texture/TextureHandle.h"
11
12#include <filesystem>
13#include <glm/mat4x4.hpp>
14#include <memory>
15#include <optional>
16#include <string>
17#include <string_view>
18#include <unordered_map>
19#include <vector>
20
29
30namespace Engine::Assets
31{
32 class Animation;
33 class Skin;
34} // namespace Engine::Assets
35
36namespace Engine::Core
37{
38 class AssetManager;
39
47 {
48 glm::mat4 modelLocalTransform{ 1.0f };
49 };
50
52 using AnchorPointMap = std::unordered_map<std::string, AnchorPoint>;
53
65
84
92 {
93 public:
98 explicit GeometryMeshStore( AssetManager * assetManager = nullptr );
99
104 void setAssetManager( AssetManager * assetManager );
105
112 [[nodiscard]] Assets::GeometryMeshHandle load( const Asset::MeshPath & meshPath );
113
119 [[nodiscard]] bool isValid( Assets::GeometryMeshHandle handle ) const;
120
126 [[nodiscard]] const Asset::MeshPath * path( Assets::GeometryMeshHandle handle ) const;
127
128 private:
132 struct Record
133 {
135 uint32_t generation = 1;
136 uint64_t payloadGeneration = 0;
137 uint64_t residencyGeneration = 0;
138 };
139
145 [[nodiscard]] static std::string keyFor( const Asset::MeshPath & meshPath );
146
148 std::vector<Record> records_;
149 std::unordered_map<std::string, uint32_t> pathToIndex_;
150 };
151
159 {
160 public:
165 explicit MaterialStore( AssetManager * assetManager = nullptr );
166
171 void setAssetManager( AssetManager * assetManager );
172
179 [[nodiscard]] Assets::MaterialHandle load( const Asset::MeshPath & materialPath );
180
187 [[nodiscard]] Assets::MaterialHandle registerRuntimeMaterial( Asset::MeshPath materialPath, std::unique_ptr<Assets::Material> material );
188
194 [[nodiscard]] bool isValid( Assets::MaterialHandle handle ) const;
195
201 [[nodiscard]] const Asset::MeshPath * path( Assets::MaterialHandle handle ) const;
202
203 private:
207 struct Record
208 {
210 uint32_t generation = 1;
211 uint64_t payloadGeneration = 0;
212 uint64_t residencyGeneration = 0;
213 };
214
220 [[nodiscard]] static std::string keyFor( const Asset::MeshPath & materialPath );
221
223 std::vector<Record> records_;
224 std::unordered_map<std::string, uint32_t> pathToIndex_;
225 };
226
234 {
235 public:
240 explicit Texture2DStore( AssetManager * assetManager = nullptr );
241
246 void setAssetManager( AssetManager * assetManager );
247
254 [[nodiscard]] Assets::Texture2DHandle load( const std::filesystem::path & source, Assets::TextureType usage = Assets::TextureType::BaseColor );
255
261 [[nodiscard]] bool isValid( Assets::Texture2DHandle handle ) const;
262
268 [[nodiscard]] const std::filesystem::path * sourcePath( Assets::Texture2DHandle handle ) const;
269
276
282 [[nodiscard]] Assets::TextureType usage( Assets::Texture2DHandle handle ) const;
283
284 private:
297
304 [[nodiscard]] static std::string keyFor( const std::filesystem::path & source, Assets::TextureType usage );
305
307 std::vector<Record> records_;
308 std::unordered_map<std::string, uint32_t> sourceToIndex_;
309 };
310
320 {
321 public:
326 explicit AudioClipStore( AssetManager * assetManager = nullptr );
327
332 void setAssetManager( AssetManager * assetManager );
333
340 [[nodiscard]] Assets::AudioClipHandle load( const Asset::Path & source );
341
347 [[nodiscard]] Assets::AudioClipHandle load( const std::filesystem::path & source );
348
354 [[nodiscard]] bool isValid( Assets::AudioClipHandle handle ) const;
355
361 [[nodiscard]] const Asset::Path * sourcePath( Assets::AudioClipHandle handle ) const;
362
368 [[nodiscard]] Asset::LoadState state( Assets::AudioClipHandle handle ) const;
369
375 [[nodiscard]] bool isLoaded( Assets::AudioClipHandle handle ) const;
376
382 [[nodiscard]] bool isLoading( Assets::AudioClipHandle handle ) const;
383
393 [[nodiscard]] Assets::Audio * payload( Assets::AudioClipHandle handle ) const;
394
395 private:
407
413 [[nodiscard]] static std::string keyFor( const Asset::Path & source );
414
416 std::vector<Record> records_;
417 std::unordered_map<std::string, uint32_t> sourceToIndex_;
418 };
419
427 {
428 public:
433 explicit AnimationClipStore( AssetManager * assetManager = nullptr );
434
439 void setAssetManager( AssetManager * assetManager );
440
446 [[nodiscard]] Assets::AnimationClipHandle load( const Asset::MeshPath & animationPath );
447
455 Asset::MeshPath animationPath,
456 std::unique_ptr<Assets::Animation> animation
457 );
458
464 [[nodiscard]] bool isValid( Assets::AnimationClipHandle handle ) const;
465
471 [[nodiscard]] const Asset::MeshPath * path( Assets::AnimationClipHandle handle ) const;
472
479
480 private:
484 struct Record
485 {
487 uint32_t generation = 1;
488 uint64_t payloadGeneration = 0;
489 uint64_t residencyGeneration = 0;
490 };
491
497 [[nodiscard]] static std::string keyFor( const Asset::MeshPath & animationPath );
498
500 std::vector<Record> records_;
501 std::unordered_map<std::string, uint32_t> pathToIndex_;
502 };
503
511 {
512 public:
517 explicit SkinStore( AssetManager * assetManager = nullptr );
518
523 void setAssetManager( AssetManager * assetManager );
524
530 [[nodiscard]] Assets::SkinHandle load( const Asset::MeshPath & skinPath );
531
537 [[nodiscard]] bool isValid( Assets::SkinHandle handle ) const;
538
544 [[nodiscard]] const Asset::MeshPath * path( Assets::SkinHandle handle ) const;
545
551 [[nodiscard]] Assets::Skin * payload( Assets::SkinHandle handle ) const;
552
553 private:
557 struct Record
558 {
560 uint32_t generation = 1;
561 uint64_t payloadGeneration = 0;
562 uint64_t residencyGeneration = 0;
563 };
564
570 [[nodiscard]] static std::string keyFor( const Asset::MeshPath & skinPath );
571
573 std::vector<Record> records_;
574 std::unordered_map<std::string, uint32_t> pathToIndex_;
575 };
576
584 {
585 public:
592 GltfStore( AssetManager * assetManager = nullptr, GeometryMeshStore * geometryMeshes = nullptr, MaterialStore * materials = nullptr );
593
598 void setAssetManager( AssetManager * assetManager );
599
604 void setGeometryMeshStore( GeometryMeshStore * geometryMeshes );
605
610 void setMaterialStore( MaterialStore * materials );
611
618 [[nodiscard]] Assets::GltfHandle load( const std::filesystem::path & source );
619
626 [[nodiscard]] Assets::GltfRenderableHandle renderable( Assets::GltfHandle gltf, std::string_view nodeName );
627
634
641 [[nodiscard]] std::optional<AnchorPoint> anchorPoint(
643 std::string_view name
644 ) const;
645
651 [[nodiscard]] std::vector<std::string> anchorPointNames( Assets::GltfRenderableHandle renderable ) const;
652
659
665 [[nodiscard]] const std::filesystem::path * sourcePath( Assets::GltfHandle gltf ) const;
666
672 [[nodiscard]] bool isValid( Assets::GltfHandle handle ) const;
673
679 [[nodiscard]] bool isValid( Assets::GltfRenderableHandle handle ) const;
680
681 private:
686 {
687 std::filesystem::path source;
688 uint32_t generation = 1;
689 uint64_t payloadGeneration = 0;
690 uint64_t residencyGeneration = 0;
691 std::unordered_map<std::string, Assets::GltfRenderableHandle> renderablesByName;
692 };
693
704
710 [[nodiscard]] static std::string keyFor( const std::filesystem::path & source );
711
717 [[nodiscard]] static std::string fallbackNodeName( size_t nodeIndex );
718
724
728 std::vector<GltfRecord> gltfRecords_;
729 std::vector<RenderableRecord> renderableRecords_;
730 std::unordered_map<std::string, uint32_t> sourceToIndex_;
731 };
732
742 {
743 public:
748 explicit AssetRegistry( AssetManager * assetManager = nullptr );
749
754 void setAssetManager( AssetManager * assetManager );
755
759 [[nodiscard]] GltfStore & gltfs()
760 {
761 return gltfs_;
762 }
763
767 [[nodiscard]] const GltfStore & gltfs() const
768 {
769 return gltfs_;
770 }
771
776 {
777 return geometryMeshes_;
778 }
779
783 [[nodiscard]] const GeometryMeshStore & geometryMeshes() const
784 {
785 return geometryMeshes_;
786 }
787
791 [[nodiscard]] MaterialStore & materials()
792 {
793 return materials_;
794 }
795
799 [[nodiscard]] const MaterialStore & materials() const
800 {
801 return materials_;
802 }
803
807 [[nodiscard]] Texture2DStore & texture2Ds()
808 {
809 return texture2Ds_;
810 }
811
815 [[nodiscard]] const Texture2DStore & texture2Ds() const
816 {
817 return texture2Ds_;
818 }
819
823 [[nodiscard]] AudioClipStore & audioClips()
824 {
825 return audioClips_;
826 }
827
831 [[nodiscard]] const AudioClipStore & audioClips() const
832 {
833 return audioClips_;
834 }
835
840 {
841 return animations_;
842 }
843
847 [[nodiscard]] const AnimationClipStore & animations() const
848 {
849 return animations_;
850 }
851
855 [[nodiscard]] SkinStore & skins()
856 {
857 return skins_;
858 }
859
863 [[nodiscard]] const SkinStore & skins() const
864 {
865 return skins_;
866 }
867
875
883
891
899
907
908 private:
917 };
918} // namespace Engine::Core
Animation clip loaded from glTF animation data.
Holds decoded PCM audio data as an engine asset.
Definition AudioAsset.h:14
Skeleton definition loaded from glTF skin data.
Definition SkinAsset.h:30
Type-erased texture handle for runtime storage.
Registry store for animation clip handles.
const Asset::MeshPath * path(Assets::AnimationClipHandle handle) const
Returns the authored animation path for an animation clip handle.
Assets::Animation * payload(Assets::AnimationClipHandle handle) const
Resolves an animation clip handle to its loaded payload behind the manager boundary.
Assets::AnimationClipHandle registerRuntimeAnimation(Asset::MeshPath animationPath, std::unique_ptr< Assets::Animation > animation)
Registers a runtime animation payload and returns its stable animation clip handle.
std::unordered_map< std::string, uint32_t > pathToIndex_
Deduplication map from keyFor() to slot index.
static std::string keyFor(const Asset::MeshPath &animationPath)
Builds the deduplication key for an animation source path and animation name.
Assets::AnimationClipHandle load(const Asset::MeshPath &animationPath)
Gets or creates a stable handle for an authored animation source path.
std::vector< Record > records_
Slot storage indexed by AnimationClipHandle::index.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new animation handles request payload loading.
bool isValid(Assets::AnimationClipHandle handle) const
Checks whether an animation clip handle refers to a live slot in this store.
AssetManager * assetManager_
Optional bridge used to request animation refs.
AnimationClipStore(AssetManager *assetManager=nullptr)
Creates an animation clip store backed by an optional asset manager.
Coordinates engine asset loading pipelines and runtime texture descriptor ownership.
const GeometryMeshStore & geometryMeshes() const
Returns the read-only geometry mesh store.
Assets::GltfHandle resolve(Assets::Authored::GltfAssetRef ref)
Resolves an authored glTF file reference to a stable glTF handle.
MaterialStore & materials()
Returns the mutable material store.
Texture2DStore texture2Ds_
Store for sampled 2D texture handles.
AssetManager * assetManager_
Optional bridge shared by all child stores.
GltfStore gltfs_
Store for glTF source and renderable node handles.
SkinStore & skins()
Returns the mutable skin store.
GltfStore & gltfs()
Returns the mutable glTF store.
Assets::AudioClipHandle resolve(Assets::Authored::AudioAssetRef ref)
Resolves an authored audio reference to a stable audio clip handle.
AssetRegistry(AssetManager *assetManager=nullptr)
Creates an asset registry and wires all child stores to the same asset manager.
const MaterialStore & materials() const
Returns the read-only material store.
Texture2DStore & texture2Ds()
Returns the mutable 2D texture store.
AudioClipStore audioClips_
Store for audio clip handles.
const AnimationClipStore & animations() const
Returns the read-only animation clip store.
const AudioClipStore & audioClips() const
Returns the read-only audio clip store.
AnimationClipStore animations_
Store for animation clip handles.
AnimationClipStore & animations()
Returns the mutable animation clip store.
GeometryMeshStore & geometryMeshes()
Returns the mutable geometry mesh store.
GeometryMeshStore geometryMeshes_
Store for non-skinned mesh geometry handles.
AudioClipStore & audioClips()
Returns the mutable audio clip store.
const Texture2DStore & texture2Ds() const
Returns the read-only 2D texture store.
Assets::GltfRenderableHandle resolve(Assets::Authored::GltfRenderableAssetRef ref)
Resolves an authored glTF node reference to a stable renderable handle.
Assets::GeometryMeshHandle resolve(Assets::Authored::GeometryMeshAssetRef ref)
Resolves an authored geometry mesh reference through its glTF renderable node.
SkinStore skins_
Store for skin/skeleton binding handles.
const GltfStore & gltfs() const
Returns the read-only glTF store.
void setAssetManager(AssetManager *assetManager)
Updates the asset manager used by every child store.
Assets::Texture2DHandle resolve(Assets::Authored::Texture2DAssetRef ref)
Resolves an authored 2D texture reference to a stable texture handle.
MaterialStore materials_
Store for material handles.
const SkinStore & skins() const
Returns the read-only skin store.
Registry store for authored audio clip handles.
static std::string keyFor(const Asset::Path &source)
Builds the deduplication key for an audio source path.
std::unordered_map< std::string, uint32_t > sourceToIndex_
Deduplication map from keyFor() to slot index.
Assets::Audio * payload(Assets::AudioClipHandle handle) const
Returns the loaded payload behind a clip handle, or nullptr when not yet loaded.
const Asset::Path * sourcePath(Assets::AudioClipHandle handle) const
Returns the authored source path for an audio clip handle.
AudioClipStore(AssetManager *assetManager=nullptr)
Creates an audio clip store backed by an optional asset manager.
Asset::LoadState state(Assets::AudioClipHandle handle) const
Returns the current CPU loading state of the payload behind a clip handle.
AssetManager * assetManager_
Optional bridge used to request legacy audio refs.
std::vector< Record > records_
Slot storage indexed by AudioClipHandle::index.
Assets::AudioClipHandle load(const Asset::Path &source)
Gets or creates a stable handle for an authored audio source path.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new audio handles request payload loading.
bool isValid(Assets::AudioClipHandle handle) const
Checks whether an audio clip handle refers to a live slot in this store.
bool isLoaded(Assets::AudioClipHandle handle) const
Checks whether the payload behind a clip handle has finished loading.
Assets::AudioClipHandle load(const std::filesystem::path &source)
Gets or creates a stable handle for an authored audio source path.
bool isLoading(Assets::AudioClipHandle handle) const
Checks whether the payload behind a clip handle is currently being loaded.
Registry store for non-skinned geometry mesh handles.
AssetManager * assetManager_
Optional bridge used to request legacy mesh refs.
const Asset::MeshPath * path(Assets::GeometryMeshHandle handle) const
Returns the authored mesh path for a geometry mesh handle.
GeometryMeshStore(AssetManager *assetManager=nullptr)
Creates a geometry mesh store backed by an optional asset manager.
bool isValid(Assets::GeometryMeshHandle handle) const
Checks whether a geometry mesh handle refers to a live slot in this store.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new geometry handles request payload loading.
std::unordered_map< std::string, uint32_t > pathToIndex_
Deduplication map from keyFor() to slot index.
Assets::GeometryMeshHandle load(const Asset::MeshPath &meshPath)
Gets or creates a stable handle for a mesh path.
static std::string keyFor(const Asset::MeshPath &meshPath)
Builds the deduplication key for a mesh source path and mesh name.
std::vector< Record > records_
Slot storage indexed by GeometryMeshHandle::index.
Registry store for glTF source files and their renderable node handles.
void setGeometryMeshStore(GeometryMeshStore *geometryMeshes)
Sets the geometry store used when importing glTF renderable metadata.
const GltfRenderableRecord * get(Assets::GltfRenderableHandle renderable) const
Returns imported metadata for a glTF renderable handle.
Assets::GeometryMeshHandle geometryMesh(Assets::GltfRenderableHandle renderable) const
Returns the geometry mesh handle used by a glTF renderable.
Assets::GltfRenderableHandle renderable(Assets::GltfHandle gltf, std::string_view nodeName)
Looks up a renderable node handle inside a loaded glTF file.
const std::filesystem::path * sourcePath(Assets::GltfHandle gltf) const
Returns the authored source path for a glTF handle.
Assets::GltfHandle load(const std::filesystem::path &source)
Gets or creates a stable handle for a glTF source file and imports its renderable metadata.
static std::string fallbackNodeName(size_t nodeIndex)
Builds the synthetic node name used for unnamed glTF nodes.
std::vector< std::string > anchorPointNames(Assets::GltfRenderableHandle renderable) const
Lists the authored AnchorPoint names for a renderable node.
void importMetadata(Assets::GltfHandle gltf)
Imports renderable, geometry, and material metadata for a loaded glTF handle.
std::vector< RenderableRecord > renderableRecords_
Slot storage indexed by GltfRenderableHandle::index.
GltfStore(AssetManager *assetManager=nullptr, GeometryMeshStore *geometryMeshes=nullptr, MaterialStore *materials=nullptr)
Creates a glTF store backed by optional asset and child stores.
static std::string keyFor(const std::filesystem::path &source)
Builds the deduplication key for a glTF source path.
bool isValid(Assets::GltfHandle handle) const
Checks whether a glTF handle refers to a live slot in this store.
GeometryMeshStore * geometryMeshes_
Store that receives geometry handles during metadata import.
MaterialStore * materials_
Store that receives material handles during metadata import.
void setMaterialStore(MaterialStore *materials)
Sets the material store used when importing glTF primitive metadata.
std::vector< GltfRecord > gltfRecords_
Slot storage indexed by GltfHandle::index.
std::unordered_map< std::string, uint32_t > sourceToIndex_
Deduplication map from keyFor() to glTF slot index.
bool isValid(Assets::GltfRenderableHandle handle) const
Checks whether a glTF renderable handle refers to a live slot in this store.
AssetManager * assetManager_
Optional bridge retained for store wiring.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used by this store and imported child records.
std::optional< AnchorPoint > anchorPoint(Assets::GltfRenderableHandle renderable, std::string_view name) const
Looks up an AnchorPoint authored below a renderable node.
Registry store for material asset handles.
const Asset::MeshPath * path(Assets::MaterialHandle handle) const
Returns the authored material path for a material handle.
static std::string keyFor(const Asset::MeshPath &materialPath)
Builds the deduplication key for a material path and material name.
std::vector< Record > records_
Slot storage indexed by MaterialHandle::index.
MaterialStore(AssetManager *assetManager=nullptr)
Creates a material store backed by an optional asset manager.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new material handles request payload loading.
Assets::MaterialHandle registerRuntimeMaterial(Asset::MeshPath materialPath, std::unique_ptr< Assets::Material > material)
Registers a runtime material payload and returns its stable material handle.
std::unordered_map< std::string, uint32_t > pathToIndex_
Deduplication map from keyFor() to slot index.
bool isValid(Assets::MaterialHandle handle) const
Checks whether a material handle refers to a live slot in this store.
Assets::MaterialHandle load(const Asset::MeshPath &materialPath)
Gets or creates a stable handle for an authored material path.
AssetManager * assetManager_
Optional bridge used to request and register legacy materials.
Registry store for skin/skeleton binding handles.
Assets::SkinHandle load(const Asset::MeshPath &skinPath)
Gets or creates a stable handle for an authored skin source path.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new skin handles request payload loading.
static std::string keyFor(const Asset::MeshPath &skinPath)
Builds the deduplication key for a skin source path and skin name.
Assets::Skin * payload(Assets::SkinHandle handle) const
Resolves a skin handle to its loaded payload behind the manager boundary.
const Asset::MeshPath * path(Assets::SkinHandle handle) const
Returns the authored skin path for a skin handle.
AssetManager * assetManager_
Optional bridge used to request skin refs.
SkinStore(AssetManager *assetManager=nullptr)
Creates a skin store backed by an optional asset manager.
std::vector< Record > records_
Slot storage indexed by SkinHandle::index.
std::unordered_map< std::string, uint32_t > pathToIndex_
Deduplication map from keyFor() to slot index.
bool isValid(Assets::SkinHandle handle) const
Checks whether a skin handle refers to a live slot in this store.
Registry store for authored sampled 2D texture handles.
bool isValid(Assets::Texture2DHandle handle) const
Checks whether a texture handle refers to a live slot in this store.
Texture2DStore(AssetManager *assetManager=nullptr)
Creates a 2D texture store backed by an optional asset manager.
Assets::TextureType usage(Assets::Texture2DHandle handle) const
Returns the semantic usage recorded for a texture handle.
static std::string keyFor(const std::filesystem::path &source, Assets::TextureType usage)
Builds the deduplication key for a texture source path and usage.
AssetManager * assetManager_
Optional bridge used to reserve legacy texture handles.
const std::filesystem::path * sourcePath(Assets::Texture2DHandle handle) const
Returns the authored source path for a texture handle.
Assets::TextureHandle legacyHandle(Assets::Texture2DHandle handle) const
Returns the legacy runtime texture handle associated with a texture asset handle.
Assets::Texture2DHandle load(const std::filesystem::path &source, Assets::TextureType usage=Assets::TextureType::BaseColor)
Gets or creates a stable handle for an authored 2D texture source path.
void setAssetManager(AssetManager *assetManager)
Sets the asset manager used when new texture handles reserve legacy runtime handles.
std::vector< Record > records_
Slot storage indexed by Texture2DHandle::index.
std::unordered_map< std::string, uint32_t > sourceToIndex_
Deduplication map from keyFor() to slot index.
CpuLoadingState LoadState
Alias used by the asset manager and refs.
Definition Asset.h:47
AssetHandle< GltfRenderableHandleTag > GltfRenderableHandle
Handle to one mesh-bearing node inside a glTF file.
Asset::Ref< Asset::Path, Audio > AudioAssetRef
Asset reference to decoded audio data loaded from a filesystem path.
AssetHandle< Texture2DHandleTag > Texture2DHandle
Handle to a file-backed sampled 2D texture.
AssetHandle< GltfHandleTag > GltfHandle
Handle to a glTF container file.
AssetHandle< AnimationClipHandleTag > AnimationClipHandle
Handle to an animation clip.
AssetHandle< SkinHandleTag > SkinHandle
Handle to skin binding data.
AssetHandle< GeometryMeshHandleTag > GeometryMeshHandle
Handle to non-skinned mesh geometry.
TextureType
Represents the semantic type of a texture, determining its Vulkan format.
Definition TextureType.h:15
@ BaseColor
Color data with gamma (SRGB format for 8-bit)
Definition TextureType.h:16
AssetHandle< AudioClipHandleTag > AudioClipHandle
Handle to audio clip asset data.
AssetHandle< MaterialHandleTag > MaterialHandle
Handle to a material payload.
std::unordered_map< std::string, AnchorPoint > AnchorPointMap
Lookup table from authored empty-node name to its AnchorPoint transform.
AssetLoadState
Load lifecycle state for registry-backed asset payloads.
@ Loading
Payload data is currently loading.
@ RequestedLoad
A load request has been queued but not started.
@ Loaded
Payload data is available.
@ Unloaded
No payload load is active.
@ Failed
Payload loading failed.
Identifies a named mesh-like asset inside an asset file.
Definition AssetPath.h:89
Identifies a single asset file on disk.
Definition AssetPath.h:13
Handle to audio clip asset data.
Definition AssetRefs.h:107
Handle to non-skinned mesh geometry.
Definition AssetRefs.h:20
Handle to a glTF container file.
Definition AssetRefs.h:12
Handle to one mesh-bearing node inside a glTF file.
Definition AssetRefs.h:29
Handle to a file-backed sampled 2D texture.
Definition AssetRefs.h:56
Named attachment transform authored as a direct child empty of a glTF mesh node.
glm::mat4 modelLocalTransform
Transform relative to the owning renderable node.
Stored metadata for one animation clip handle slot.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
Asset::MeshPath path
Authored source path and animation name.
uint32_t generation
Store generation used to validate handles for this slot.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
Stored metadata for one audio clip handle slot.
Assets::AudioAssetRef payloadRef
Legacy ref through which the decoded payload swaps in.
uint32_t generation
Store generation used to validate handles for this slot.
Asset::Path source
Engine-relative authored audio source path.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
Stored metadata for one geometry mesh handle slot.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
uint32_t generation
Store generation used to validate handles for this slot.
Asset::MeshPath path
Authored source path and mesh name.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
Imported metadata for one renderable node inside a glTF file.
Ecs::Transform authoredTransform
Transform imported from the glTF node.
uint32_t nodeIndex
Node index in the source glTF file.
AnchorPointMap anchorPoints
Direct-child empty transforms keyed by their authored node names.
uint32_t meshIndex
Mesh index referenced by the source glTF node.
Assets::GeometryMeshHandle geometry
Geometry payload handle for the node mesh.
std::string nodeName
Authored node name, or a generated fallback for unnamed nodes.
std::vector< Assets::MaterialHandle > primitiveMaterials
Material handle per glTF primitive.
bool isStatic
True when imported metadata marks the node as static.
Assets::GltfHandle gltf
Source glTF container that owns this renderable node.
Stored metadata for one glTF source handle slot.
std::unordered_map< std::string, Assets::GltfRenderableHandle > renderablesByName
Node-name lookup table.
std::filesystem::path source
Engine-relative source glTF file path.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
uint32_t generation
Store generation used to validate handles for this slot.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
Stored metadata for one glTF renderable handle slot.
GltfRenderableRecord data
Imported renderable metadata exposed by get().
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
uint32_t generation
Store generation used to validate handles for this slot.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
Stored metadata for one material handle slot.
uint32_t generation
Store generation used to validate handles for this slot.
Asset::MeshPath path
Authored source path and material name.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
Stored metadata for one skin handle slot.
Asset::MeshPath path
Authored source path and skin name.
uint32_t generation
Store generation used to validate handles for this slot.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
Stored metadata for one 2D texture handle slot.
uint32_t generation
Store generation used to validate handles for this slot.
uint64_t residencyGeneration
Residency change counter reserved for streaming state.
uint64_t payloadGeneration
Payload change counter reserved for cache invalidation.
Assets::TextureType usage
Semantic texture usage for descriptor registration.
std::filesystem::path source
Engine-relative authored texture source path.
Assets::TextureHandle legacyHandle
Renderer descriptor handle reserved through AssetManager.
Local transform matrix and helpers for translation, rotation, and scale.
Definition EcsData.h:476