Some review findings.
This commit is contained in:
@@ -332,6 +332,11 @@ void XFileImporter::CreateMeshes( aiScene* pScene, aiNode* pNode, const std::vec
|
||||
// collect vertex data for indices of this face
|
||||
for( unsigned int d = 0; d < df.mNumIndices; ++d ) {
|
||||
df.mIndices[d] = newIndex;
|
||||
const unsigned int newIdx( pf.mIndices[ d ] );
|
||||
if ( newIdx > sourceMesh->mPositions.size() ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
orgPoints[newIndex] = pf.mIndices[d];
|
||||
|
||||
// Position
|
||||
@@ -459,7 +464,7 @@ void XFileImporter::CreateAnimations( aiScene* pScene, const XFile::Scene* pData
|
||||
nbone->mNodeName.Set( bone->mBoneName);
|
||||
nanim->mChannels[b] = nbone;
|
||||
|
||||
// keyframes are given as combined transformation matrix keys
|
||||
// key-frames are given as combined transformation matrix keys
|
||||
if( !bone->mTrafoKeys.empty() )
|
||||
{
|
||||
nbone->mNumPositionKeys = (unsigned int)bone->mTrafoKeys.size();
|
||||
|
||||
@@ -471,7 +471,10 @@ void XFileParser::ParseDataObjectMesh( Mesh* pMesh)
|
||||
unsigned int numIndices = ReadInt();
|
||||
Face& face = pMesh->mPosFaces[a];
|
||||
for (unsigned int b = 0; b < numIndices; ++b) {
|
||||
face.mIndices.push_back( ReadInt() );
|
||||
const int idx( ReadInt() );
|
||||
if ( idx <= numVertices ) {
|
||||
face.mIndices.push_back( idx );
|
||||
}
|
||||
}
|
||||
TestForSeparator();
|
||||
}
|
||||
@@ -1293,7 +1296,8 @@ unsigned int XFileParser::ReadBinDWord() {
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
unsigned int XFileParser::ReadInt()
|
||||
{
|
||||
if( mIsBinaryFormat)
|
||||
:
|
||||
cd if( mIsBinaryFormat)
|
||||
{
|
||||
if( mBinaryNumCount == 0 && mEnd - mP >= 2)
|
||||
{
|
||||
@@ -1305,6 +1309,7 @@ unsigned int XFileParser::ReadInt()
|
||||
}
|
||||
|
||||
--mBinaryNumCount;
|
||||
const size_t len( mEnd - mP );
|
||||
if ( mEnd - mP >= 4) {
|
||||
return ReadBinDWord();
|
||||
} else {
|
||||
@@ -1340,6 +1345,7 @@ unsigned int XFileParser::ReadInt()
|
||||
}
|
||||
|
||||
CheckForSeparator();
|
||||
|
||||
return isNegative ? ((unsigned int) -int( number)) : number;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user