ColladaParser::ReadPrimitives: get rid of "idx" iterator.

We will be adding non-sequential access to the indices vector in one of the upcoming commits.
pull/414/head
Johannes Ebersold 2014-11-19 14:04:49 +01:00 committed by Wolfgang Herget
parent 543bd5c0d0
commit 70d2c8571b
1 changed files with 1 additions and 5 deletions

View File

@ -2093,10 +2093,6 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
acc->mData = &ResolveLibraryReference( mDataLibrary, acc->mSource);
}
// now assemble vertex data according to those indices
std::vector<size_t>::const_iterator idx = indices.begin();
// For continued primitives, the given count does not come all in one <p>, but only one primitive per <p>
size_t numPrimitives = pNumPrimitives;
if( pPrimType == Prim_TriFans || pPrimType == Prim_Polygon)
@ -2140,7 +2136,7 @@ void ColladaParser::ReadPrimitives( Mesh* pMesh, std::vector<InputChannel>& pPer
ai_assert( numOffsets < 20 && perVertexOffset < 20);
size_t vindex[20];
for( size_t offsets = 0; offsets < numOffsets; ++offsets)
vindex[offsets] = *idx++;
vindex[offsets] = indices[currentPrimitive * numOffsets * numPoints + b * numOffsets + offsets];
// extract per-vertex channels using the global per-vertex offset
for( std::vector<InputChannel>::iterator it = pMesh->mPerVertexData.begin(); it != pMesh->mPerVertexData.end(); ++it)