20 template <
typename Tag>
35 explicit operator bool() const noexcept {
return isValid(); }
42 return lhs.index == rhs.index && lhs.generation == rhs.generation;
61 template <
typename Tag>
72 template <
typename Tag>
80 return (
static_cast<std::size_t
>(handle.index) << 32u) ^ handle.generation;
85 struct GltfRenderableHandleTag;
86 struct GeometryMeshHandleTag;
87 struct MaterialHandleTag;
88 struct Texture2DHandleTag;
89 struct CubemapTextureHandleTag;
90 struct RenderTargetTextureHandleTag;
91 struct FontAtlasTextureHandleTag;
92 struct AudioClipHandleTag;
93 struct SkeletalMeshHandleTag;
94 struct AnimationClipHandleTag;
96 struct SkeletonHandleTag;
234 template <
typename Tag>
AssetHandle< GltfRenderableHandleTag > GltfRenderableHandle
Handle to one mesh-bearing node inside a glTF file.
AssetHandle< FontHandleTag > FontHandle
Handle to a font asset.
AssetHandle< SkeletalMeshHandleTag > SkeletalMeshHandle
Handle to skinned mesh geometry.
AssetHandle< CubemapTextureHandleTag > CubemapTextureHandle
Handle to a cubemap texture.
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< SkeletonHandleTag > SkeletonHandle
Handle to skeleton metadata.
AssetHandle< SkinHandleTag > SkinHandle
Handle to skin binding data.
AssetHandle< GeometryMeshHandleTag > GeometryMeshHandle
Handle to non-skinned mesh geometry.
constexpr NullAssetHandle Null
Null value assignable to any typed asset handle.
AssetHandle< AudioClipHandleTag > AudioClipHandle
Handle to audio clip asset data.
AssetHandle< FontAtlasTextureHandleTag > FontAtlasTextureHandle
Handle to the generated texture atlas backing a font.
AssetHandle< RenderTargetTextureHandleTag > RenderTargetTextureHandle
Handle to a renderer-created texture that render passes write into.
AssetHandle< MaterialHandleTag > MaterialHandle
Handle to a material payload.
Allows handles to be used as unordered_map/set keys without losing the handle's type safety.
std::size_t operator()(AssetHandle< Tag > handle) const noexcept
Computes a hash from a handle's slot index and generation.
Stable typed reference into an asset registry store.
friend bool operator!=(AssetHandle lhs, AssetHandle rhs) noexcept
Compares two handles for inequality.
friend bool operator==(AssetHandle lhs, AssetHandle rhs) noexcept
Compares two handles by slot index and generation.
bool isValid() const noexcept
Returns true for any non-null handle, including one that may be stale for a store.
Explicit null value assignable to any typed asset handle.