- Collada loader now loads bones

git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@370 67173fc5-114c-0410-ac8e-9d2fd5bffc1f
This commit is contained in:
ulfjorensen
2009-03-27 20:43:22 +00:00
parent 48d768f15f
commit c89944b2af
4 changed files with 200 additions and 75 deletions

View File

@@ -1758,6 +1758,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
if( pPrimType == Prim_TriFans || pPrimType == Prim_Polygon)
numPrimitives = 1;
pMesh->mFaceSize.reserve( numPrimitives);
pMesh->mFacePosIndices.reserve( indices.size() / numOffsets);
for( size_t a = 0; a < numPrimitives; a++)
{
// determine number of points for this primitive
@@ -1801,6 +1804,9 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
// and extract per-index channels using there specified offset
BOOST_FOREACH( const InputChannel& input, pPerIndexChannels)
ExtractDataObjectFromChannel( input, vindex[input.mOffset], pMesh);
// store the vertex-data index for later assignment of bone vertex weights
pMesh->mFacePosIndices.push_back( vindex[perVertexOffset]);
}
}