{
for (BoneNode& b : g.m_Nodes.m_RootNodes)
{
- DrawBone(NULL, &b, af, lm::matrix4f::get_identity());
+ DrawBone(&b, af, lm::matrix4f::get_identity());
}
}
glPopAttrib();
}
-void View3D::DrawBone(Bone* parent, BoneNode* bn, int frame, const lm::matrix4f& m)
+void View3D::DrawBone(BoneNode* bn, int frame, const lm::matrix4f& m)
{
- Bone* b = bn->m_Bone;
lm::matrix4f fm = bn->GetFrameTransform(frame);
lm::matrix4f nf = fm * m;
- if (b != NULL && parent != NULL)
+ if (bn->m_Bone != NULL)
{
lm::vec3f v0 = lm::vec3f(0, 0, 0) * m;
lm::vec3f v1 = lm::vec3f(0, 0, 0) * nf;
for (size_t i = 0; i < bn->m_Children.size(); ++i)
{
- DrawBone(b, &bn->m_Children[i], frame, nf);
+ DrawBone(&bn->m_Children[i], frame, nf);
}
}
void DrawAllGeomMeshStd(bool UseShader, std::vector<MeshBuf*>& meshes);
void DrawAllGeomVLinks(std::vector<MeshBuf*>& meshes);
void DrawAllGeomBone(void);
- void DrawBone(Bone* parent, BoneNode* b, int frame, const lm::matrix4f& m);
+ void DrawBone(BoneNode* b, int frame, const lm::matrix4f& m);
void DrawAllGeomPolyline(std::vector<MeshBuf*>& meshes);
void DrawPolyline(MeshBuf& mbuf);