WIP Loading of multiple roots in rig

This commit is contained in:
Xiao Qi 2023-03-15 19:26:13 +08:00
parent c824f2c9e4
commit e06ef624e6
2 changed files with 10 additions and 1 deletions

View File

@ -54,6 +54,6 @@ namespace SHADE
~SHRigAsset();
SHRigDataHeader header;
std::vector<SHRigNodeData> nodeDataCollection{};
SHRigNodeAsset* root;
std::vector<SHRigNodeAsset*> roots;
};
}

View File

@ -279,6 +279,8 @@ namespace SHADE
SHRigNodeAsset* depthPtr = nodePool + 1;
NodeTemp* depthTempPtr = dst + 1;
uint32_t nodeCount{ 0 };
while(!nodeQueue.empty())
{
auto currPair = nodeQueue.front();
@ -288,6 +290,13 @@ namespace SHADE
currNode->idRef = currTemp->id;
nodeCount++;
if (currTemp->numChild == 0 && nodeCount < header.nodeCount)
{
}
for (auto i{0}; i < currTemp->numChild; ++i)
{
currNode->children.push_back(depthPtr);