Parsing fails if faces have only two (v and vt) indices
Closed this issue · 1 comments
GoogleCodeExporter commented
see attached file...
the solution is inside the Face-Object:
the following methods need to be corrected:
public int[] getNormalIndices()
public int[] getTextureIndices()
into this (suggestion)
public int[] getNormalIndices() {
int[] v = new int[getNormalIndexCount()];
for (int i = 0; i < v.length; i++)
v[i] = getNormalIndex(i);
return v;
}
public int[] getTextureIndices() {
int[] v = new int[getTextureIndexCount()];
for (int i = 0; i < v.length; i++)
v[i] = getTextureIndex(i);
return v;
}
plus the following methods need to be added:
public int getTextureIndexCount() {
return uvIndices.size();
}
public int getNormalIndexCount() {
return normalIndices.size();
}
cheers
martin
Original issue reported on code.google.com by maybi...@gmail.com
on 7 Feb 2010 at 10:20
Attachments:
GoogleCodeExporter commented
This could be the slowest fix in history. My apologies, it's been a hectic
year. Hope it didn't hold you back to much.
MattD
Original comment by mattdit...@gmail.com
on 1 Aug 2010 at 12:40
- Changed state: Fixed