Refactor Skeleton Mapping to be handled by Skinned Model instead of Animation asset

This commit is contained in:
Wojtek Figat
2023-04-26 14:27:01 +02:00
parent 39b89ada6c
commit 5b50562a9f
7 changed files with 117 additions and 126 deletions

View File

@@ -88,7 +88,6 @@ public:
/// <summary>
/// Gets the root node reference.
/// </summary>
/// <returns>The root node.</returns>
FORCE_INLINE SkeletonNode& RootNode()
{
ASSERT(Nodes.HasItems());
@@ -98,7 +97,6 @@ public:
/// <summary>
/// Gets the root node reference.
/// </summary>
/// <returns>The root node.</returns>
FORCE_INLINE const SkeletonNode& RootNode() const
{
ASSERT(Nodes.HasItems());
@@ -108,7 +106,6 @@ public:
/// <summary>
/// Swaps the contents of object with the other object without copy operation. Performs fast internal data exchange.
/// </summary>
/// <param name="other">The other object.</param>
void Swap(SkeletonData& other)
{
Nodes.Swap(other.Nodes);
@@ -135,6 +132,14 @@ public:
return -1;
}
uint64 GetMemoryUsage() const
{
uint64 result = Nodes.Capacity() * sizeof(SkeletonNode) + Bones.Capacity() * sizeof(SkeletonBone);
for (const auto& e : Nodes)
result += (e.Name.Length() + 1) * sizeof(Char);
return result;
}
/// <summary>
/// Releases data.
/// </summary>