SkeletonManager class

Public types

struct SkeletonSlot

Public static variables

static uint32_t MAX_SKELETON_SLOTS constexpr
static uint32_t MAX_TOTAL_BONES constexpr

Public static functions

static auto Get() -> SkeletonManager&

Public functions

auto Initialize(VulkanMemory* vkMem) -> bool
void Shutdown()
Free GPU buffers. Must be called before VulkanMemory::Shutdown().
auto LoadSkeleton(const SkeletonAsset& asset, TnxName name, AssetID id = {}) -> uint32_t
auto LoadSkeleton(AssetID id) -> uint32_t
Resolve by AssetID from AssetRegistry, decode from disk, and load.
auto LoadSkeleton(TnxName name) -> uint32_t
Resolve by TnxName from AssetRegistry, decode from disk, and load.
auto GetSkeletonCPU(uint32_t slot) const -> const SkeletonAsset*
CPU skeleton for hierarchy queries (chain walking, socket lookup).
auto GetBoneDataAddr() const -> uint64_t
auto GetBoneParentAddr() const -> uint64_t
auto GetSkeletonSlotAddr() const -> uint64_t
auto GetSlot(uint32_t slot) const -> const SkeletonSlot&
auto GetSkeletonCount() const -> uint32_t
void FlushPendingUploads()
Block until all pending GPU bone-data upload jobs have completed.
auto IsUploadComplete() const -> bool
Non-blocking poll — true when all GPU upload jobs have completed.
auto FindSlotByTName(TnxName name) const -> uint32_t
auto FindSlotByID(AssetID id) const -> uint32_t
auto GetSlotID(uint32_t slot) const -> AssetID

Function documentation

uint32_t SkeletonManager::LoadSkeleton(const SkeletonAsset& asset, TnxName name, AssetID id = {})

Load a SkeletonAsset — copies bone data into the mega-buffer and retains a CPU copy for chain walking. Records name/ID in AssetRegistry. Returns the slot ID, or UINT32_MAX on failure.