Semi-broken skeletally-animated model COLLADA->PMD converter.

This was SVN commit r4691.
This commit is contained in:
Ykkrosh
2006-12-12 02:11:24 +00:00
parent 207d54e825
commit 5d8bef5f6e
9 changed files with 475 additions and 48 deletions
+12 -2
View File
@@ -39,7 +39,12 @@ static void SkinPoint(const SModelVertex& vertex,const CMatrix3D* matrices,CVect
const SVertexBlend& blend=vertex.m_Blend;
// must have at least one valid bone if we're using SkinPoint
debug_assert(blend.m_Bone[0]!=0xff);
if (blend.m_Bone[0] == 0xff)
{
// (CModel should have already complained about this)
result = CVector3D(0, 0, 0);
return;
}
const CMatrix3D& m=matrices[blend.m_Bone[0]];
m.Transform(vertex.m_Coords,result);
@@ -60,7 +65,12 @@ static void SkinNormal(const SModelVertex& vertex, const CMatrix3D* invtranspmat
const SVertexBlend& blend=vertex.m_Blend;
// must have at least one valid bone if we're using SkinNormal
debug_assert(blend.m_Bone[0]!=0xff);
if (blend.m_Bone[0] == 0xff)
{
// (CModel should have already complained about this)
result = CVector3D(0, 0, 0);
return;
}
const CMatrix3D& m = invtranspmatrices[blend.m_Bone[0]];
m.Rotate(vertex.m_Norm, result);