BoneCacheLocal struct

PostPhysics-scoped bone cache; amortizes FK chain walks across multiple socket queries per tick. Capacity is intentionally small — most Constructs query ≤16 unique bones per frame.

Public static variables

static uint32_t MaxCachedBones constexpr

Public functions

void Clear()
Reset the cache at the start of each PostPhysics tick.
auto Find(uint32_t boneIndex) const -> const BoneTransform*
Returns the cached world transform for boneIndex, or nullptr if not yet evaluated.
void Insert(uint32_t boneIndex, const BoneTransform& t)
Store a resolved world transform; silently drops the entry if the cache is full.
auto FindNearestCachedAncestor(uint32_t targetBoneIndex, const SkeletonAsset& skeleton) const -> ChainWalkResult

Public variables

BoneCacheEntry entries
uint32_t count

Function documentation

ChainWalkResult BoneCacheLocal::FindNearestCachedAncestor(uint32_t targetBoneIndex, const SkeletonAsset& skeleton) const

Walk up the skeleton hierarchy from targetBoneIndex to find the nearest cached ancestor. Returns the ancestor's world transform and the chain of bone indices (exclusive ancestor, inclusive target) that still need FK evaluation.