Compact heighfield dump and debug project to load it.

This commit is contained in:
Mikko Mononen
2010-03-01 08:22:50 +00:00
parent dbf95000e6
commit af0d41f5ff
15 changed files with 2235 additions and 13398 deletions
+9 -2
View File
@@ -181,8 +181,15 @@ bool rcMeshLoaderObj::load(const char* filename)
{
// Faces
nv = parseFace(row+1, face, 32, m_vertCount);
for (int i = 2; i < nv; ++i)
addTriangle(face[0], face[i-1], face[i], tcap);
for (int i = 2; i < nv; ++i)
{
const int a = face[0];
const int b = face[i-1];
const int c = face[i];
if (a < 0 || a >= m_vertCount || b < 0 || b >= m_vertCount || c < 0 || c >= m_vertCount)
continue;
addTriangle(a, b, c, tcap);
}
}
}