for (GeomObject& g : m_Scene->m_Objects)
{
- for (BoneRoot& b : g.m_BoneAnimation.m_RootNodes)
+ for (BoneNode& b : g.m_BoneAnimation.m_RootNodes)
{
lm::matrix4f m = b.m_Transform;
- DrawBone(NULL, b.m_Bone, af, m);
+ DrawBone(NULL, &b, af, m);
}
}
glPopAttrib();
}
-void View3D::DrawBone(Bone* parent, Bone* b, int frame, lm::matrix4f m)
+void View3D::DrawBone(Bone* parent, BoneNode* bn, int frame, lm::matrix4f m)
{
+ Bone* b = bn->m_Bone;
if (b == NULL)
return;
glPopMatrix();
- for (size_t i = 0; i < b->m_Children.size(); ++i)
+ for (size_t i = 0; i < bn->m_Children.size(); ++i)
{
- DrawBone(b, b->m_Children[i], frame, nf);
+ DrawBone(b, &bn->m_Children[i], frame, nf);
}
}