Compare commits

..

1 Commits

Author SHA1 Message Date
Xiao Qi 1ce0155a4c WIP Saving all nodes and structures 2023-03-15 19:26:39 +08:00
5 changed files with 3371 additions and 12 deletions

3343
MD_HomeownerV2.gltf Normal file

File diff suppressed because one or more lines are too long

View File

@ -1,12 +1,12 @@
-- outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
-- interdir = "%{wks.location}/bin_int"
-- workspace "ModelCompile"
-- architecture "x64"
-- configurations
-- {
-- "Release",
-- "Debug"
-- }
outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
interdir = "%{wks.location}/bin_int"
workspace "ModelCompile"
architecture "x64"
configurations
{
"Release",
"Debug"
}
project "ModelCompiler"
kind "ConsoleApp"
@ -56,4 +56,5 @@ project "ModelCompiler"
defines{"_RELEASE"}
filter "configurations:Publish"
flags {"ExcludeFromBuild"}
optimize "On"
defines{"_RELEASE, _PUBLISH"}

View File

@ -216,6 +216,9 @@ namespace SH_COMP
)
);
int nodeCounter{ 0 };
IndexType latest{ rig.header.startNode };
while (!nodeQueue.empty())
{
auto const currentPair = nodeQueue.front();
@ -232,6 +235,17 @@ namespace SH_COMP
reinterpret_cast<char const*>(&childCount),
sizeof(uint32_t)
);
nodeCounter++;
if (node.children.empty() && nodeCounter < rig.nodes.size())
{
nodeQueue.push(
std::make_pair(
++latest,
rig.nodes.data() + latest
)
);
}
for (auto const& child : node.children)
{
@ -239,6 +253,8 @@ namespace SH_COMP
child,
rig.nodes.data() + child
));
latest = latest < child ? child : latest;
}
}
}

View File

@ -39,7 +39,6 @@ namespace SH_COMP
std::vector<AnimData> anims;
RigData rig;
std::unordered_map<uint32_t, uint32_t> nodeIndexMap;
; };
}

View File

@ -18,7 +18,7 @@ int main(int argc, char* argv[])
{
std::vector<std::string> paths;
#if 1
#if 0
if (argc == 1)
{