Allow several spaces between numbers in OBJ files.

pull/316/head
Tyson Grant Nottingham 2014-07-21 23:03:08 -07:00
parent 3e9fab3bfc
commit 36c82fe5b0
1 changed files with 12 additions and 6 deletions

View File

@ -234,12 +234,18 @@ void ObjFileParser::copyNextLine(char *pBuffer, size_t length)
void ObjFileParser::getVector( std::vector<aiVector3D> &point3d_array ) {
size_t numComponents( 0 );
DataArrayIt tmp( m_DataIt );
while( !IsLineEnd( *tmp ) ) {
if( *tmp == ' ' ) {
++numComponents;
}
while( true ) {
while( isspace(*tmp) && !IsLineEnd(*tmp) ) {
tmp++;
}
if( IsLineEnd(*tmp) ) {
break;
}
while( !isspace(*tmp) ) {
tmp++;
}
++numComponents;
}
float x, y, z;
if( 2 == numComponents ) {
copyNextWord( m_buffer, BUFFERSIZE );