Monster update which adds detail height meshes.

- Added detail height mesh generation (RecastDetailMesh.cpp) for single,tiled statmeshes as well as tilemesh.
- Added feature to contour tracing which detects extra vertices along tile edges which should be removed later.
- Changed the tiled stat mesh preprocess, so that it first generated polymeshes per tile and finally combines them.
- Fixed bug in the GUI code where invisible buttons could be pressed.
This commit is contained in:
Mikko Mononen
2009-08-24 12:44:44 +00:00
parent b1addd3574
commit 6de4d30705
33 changed files with 5321 additions and 1765 deletions

View File

@@ -40,7 +40,7 @@ void rcIntArray::resize(int n)
}
m_size = n;
}
void rcCalcBounds(const float* verts, int nv, float* bmin, float* bmax)
{
// Calculate bounding box.
@@ -77,20 +77,6 @@ bool rcCreateHeightfield(rcHeightfield& hf, int width, int height,
return true;
}
/*void rcMarkWalkableTriangles(const float walkableSlopeAngle,
const int* tris, const float* norms, int nt,
unsigned char* flags)
{
const float walkableThr = cosf(walkableSlopeAngle/180.0f*(float)M_PI);
for (int i = 0; i < nt; ++i)
{
// Check if the face is walkable.
if (norms[i*3+1] > walkableThr)
flags[i] |= RC_WALKABLE;
}
}*/
static void calcTriNormal(const float* v0, const float* v1, const float* v2, float* norm)
{
float e0[3], e1[3];
@@ -284,4 +270,3 @@ static int getCompactHeightFieldMemoryusage(const rcCompactHeightfield& chf)
size += sizeof(rcCompactCell) * chf.width * chf.height;
return size;
}