OSDN Git Service

データ構造の改良
[qtgeoviewer/QtGeoViewer.git] / Src / QtGeoViewer / View3D.cpp
index 175908a..ba8b127 100644 (file)
@@ -966,18 +966,19 @@ void View3D::DrawAllGeomBone(void)
 
        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;
 
@@ -1011,9 +1012,9 @@ void View3D::DrawBone(Bone* parent, Bone* b, int frame, lm::matrix4f m)
 
        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);
        }
 }