mirror of
https://github.com/recastnavigation/recastnavigation.git
synced 2026-11-18 13:56:00 +00:00
Compact heighfield dump and debug project to load it.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user