Added skeleton hierarchy
This commit is contained in:
@@ -77,7 +77,6 @@ namespace Nuake
|
||||
}
|
||||
|
||||
ProcessSkinnedNode(scene->mRootNode, scene);
|
||||
|
||||
if (scene->HasAnimations())
|
||||
{
|
||||
SkeletalAnimation animation;
|
||||
@@ -353,6 +352,23 @@ namespace Nuake
|
||||
}
|
||||
}
|
||||
|
||||
void ModelLoader::ProcessSkeleton(SkeletonNode& des, const aiNode* src)
|
||||
{
|
||||
// Create a Bone object for this node
|
||||
SkeletonNode bone;
|
||||
bone.Name = src->mName.C_Str();
|
||||
bone.Transform = ConvertMatrixToGLMFormat(src->mTransformation);
|
||||
|
||||
des.ChildrenCount++;
|
||||
des.Children.push_back(bone);
|
||||
|
||||
// Recursively process child nodes (bones)
|
||||
for (uint32_t i = 0; i < src->mNumChildren; i++)
|
||||
{
|
||||
ProcessSkeleton(bone, src->mChildren[i]);
|
||||
}
|
||||
}
|
||||
|
||||
std::vector<uint32_t> ModelLoader::ProcessIndices(aiMesh* mesh)
|
||||
{
|
||||
auto indices = std::vector<uint32_t>();
|
||||
|
||||
Reference in New Issue
Block a user