Animation WIP merge #321

Merged
XiaoQiDigipen merged 76 commits from SP3-17-animation-system into main 2023-01-30 17:35:57 +08:00
2 changed files with 3 additions and 6 deletions
Showing only changes of commit af3e4a3cfd - Show all commits

View File

@ -33,7 +33,6 @@ namespace SHADE
}
// Do a recursive depth first traversal to populate the rig
nodeCount = 0;
rootNode = recurseCreateNode(asset, asset.root);
}
@ -60,7 +59,7 @@ namespace SHADE
int SHRig::GetNodeCount() const noexcept
{
return nodeCount;
return static_cast<int>(nodes.size());
}
int SHRig::GetNodeIndex(Handle<Node> node) const noexcept
@ -80,7 +79,6 @@ namespace SHADE
{
// Construct the node
auto newNode = nodeStore.Create();
++nodeCount;
// Fill the node with data
const auto& NODE_DATA = asset.nodeDataCollection.at(sourceNode->idRef);
@ -91,9 +89,9 @@ namespace SHADE
{
nodeNames.emplace(newNode, NODE_DATA.name);
nodesByName.emplace(NODE_DATA.name, newNode);
nodeIndexMap.emplace(newNode, nodes.size());
nodes.emplace_back(newNode);
}
nodeIndexMap.emplace(newNode, sourceNode->idRef);
nodes.emplace_back(newNode);
// Fill child nodes
for (const auto& child : sourceNode->children)

View File

@ -94,7 +94,6 @@ namespace SHADE
std::unordered_map<std::string, Handle<Node>> nodesByName;
std::vector<Handle<Node>> nodes;
std::unordered_map<Handle<Node>, int> nodeIndexMap;
int nodeCount = 0;
SHResourceLibrary<Node> nodeStore;
/*---------------------------------------------------------------------------------*/