Fixed bug with vertex positions - #1
Conversation
|
Can you post a test case which was failing earlier? |
|
I'm sorry, obj files that were exported from 3dsMax have 2 spaces after each "v", which is weird. here's a screenshot http://ii.pe/Tengiz_1439592782.jpg |
|
Ok. Maybe a better way to fix this is to modify the tokenizer to be whitespace insensitive. Perhaps you could modify the line which splits on |
|
Err that should be \s or whatever the regex pattern is for whitespace. |
|
yes sir, great solution! |
|
of in line 25, instead of this: |
|
What if some other code generated an example where the components of the vector 3 were spaced differently, for example: |
|
excellent question. |
|
I don't see why would anyone generate it using multiple spaces between values, but I could definitely get it if someone used, for example, \t character as a separator. Hence /\s+/ would be ideal |
Vertices marked with v has 2 spaces after values, so yeah