Compare commits
1 Commits
main
...
MultipleRo
Author | SHA1 | Date |
---|---|---|
Xiao Qi | 1ce0155a4c |
File diff suppressed because one or more lines are too long
21
premake5.lua
21
premake5.lua
|
@ -1,12 +1,12 @@
|
||||||
-- outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
|
outputdir = "%{wks.location}/bin/%{cfg.buildcfg}"
|
||||||
-- interdir = "%{wks.location}/bin_int"
|
interdir = "%{wks.location}/bin_int"
|
||||||
-- workspace "ModelCompile"
|
workspace "ModelCompile"
|
||||||
-- architecture "x64"
|
architecture "x64"
|
||||||
-- configurations
|
configurations
|
||||||
-- {
|
{
|
||||||
-- "Release",
|
"Release",
|
||||||
-- "Debug"
|
"Debug"
|
||||||
-- }
|
}
|
||||||
|
|
||||||
project "ModelCompiler"
|
project "ModelCompiler"
|
||||||
kind "ConsoleApp"
|
kind "ConsoleApp"
|
||||||
|
@ -56,4 +56,5 @@ project "ModelCompiler"
|
||||||
defines{"_RELEASE"}
|
defines{"_RELEASE"}
|
||||||
|
|
||||||
filter "configurations:Publish"
|
filter "configurations:Publish"
|
||||||
flags {"ExcludeFromBuild"}
|
optimize "On"
|
||||||
|
defines{"_RELEASE, _PUBLISH"}
|
|
@ -216,6 +216,9 @@ namespace SH_COMP
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
int nodeCounter{ 0 };
|
||||||
|
IndexType latest{ rig.header.startNode };
|
||||||
|
|
||||||
while (!nodeQueue.empty())
|
while (!nodeQueue.empty())
|
||||||
{
|
{
|
||||||
auto const currentPair = nodeQueue.front();
|
auto const currentPair = nodeQueue.front();
|
||||||
|
@ -232,6 +235,17 @@ namespace SH_COMP
|
||||||
reinterpret_cast<char const*>(&childCount),
|
reinterpret_cast<char const*>(&childCount),
|
||||||
sizeof(uint32_t)
|
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)
|
for (auto const& child : node.children)
|
||||||
{
|
{
|
||||||
|
@ -239,6 +253,8 @@ namespace SH_COMP
|
||||||
child,
|
child,
|
||||||
rig.nodes.data() + child
|
rig.nodes.data() + child
|
||||||
));
|
));
|
||||||
|
|
||||||
|
latest = latest < child ? child : latest;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ namespace SH_COMP
|
||||||
std::vector<AnimData> anims;
|
std::vector<AnimData> anims;
|
||||||
|
|
||||||
RigData rig;
|
RigData rig;
|
||||||
|
|
||||||
std::unordered_map<uint32_t, uint32_t> nodeIndexMap;
|
std::unordered_map<uint32_t, uint32_t> nodeIndexMap;
|
||||||
; };
|
; };
|
||||||
}
|
}
|
|
@ -18,7 +18,7 @@ int main(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
std::vector<std::string> paths;
|
std::vector<std::string> paths;
|
||||||
|
|
||||||
#if 1
|
#if 0
|
||||||
|
|
||||||
if (argc == 1)
|
if (argc == 1)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue