Some better names for fields in Sample class

This commit is contained in:
Graham Pentheny
2025-03-31 00:26:19 -04:00
parent ea814a1a1c
commit ad6b1ec2c6
6 changed files with 322 additions and 325 deletions

View File

@@ -192,15 +192,15 @@ void Sample_Debug::handleRender()
{
if (m_chf)
{
duDebugDrawCompactHeightfieldRegions(&m_dd, *m_chf);
duDebugDrawCompactHeightfieldRegions(&m_debugDraw, *m_chf);
// duDebugDrawCompactHeightfieldSolid(&dd, *m_chf);
}
if (m_navMesh)
duDebugDrawNavMesh(&m_dd, *m_navMesh, DU_DRAWNAVMESH_OFFMESHCONS);
duDebugDrawNavMesh(&m_debugDraw, *m_navMesh, DU_DRAWNAVMESH_OFFMESHCONS);
if (m_ref && m_navMesh)
duDebugDrawNavMeshPoly(&m_dd, *m_navMesh, m_ref, duRGBA(255,0,0,128));
duDebugDrawNavMeshPoly(&m_debugDraw, *m_navMesh, m_ref, duRGBA(255,0,0,128));
/* float bmin[3], bmax[3];
rcVsub(bmin, m_center, m_halfExtents);
@@ -210,13 +210,13 @@ void Sample_Debug::handleRender()
if (m_cset)
{
duDebugDrawRawContours(&m_dd, *m_cset, 0.25f);
duDebugDrawContours(&m_dd, *m_cset);
duDebugDrawRawContours(&m_debugDraw, *m_cset, 0.25f);
duDebugDrawContours(&m_debugDraw, *m_cset);
}
if (m_pmesh)
{
duDebugDrawPolyMesh(&m_dd, *m_pmesh);
duDebugDrawPolyMesh(&m_debugDraw, *m_pmesh);
}
/*
@@ -323,7 +323,7 @@ void Sample_Debug::handleRenderOverlay(double* /*proj*/, double* /*model*/, int*
void Sample_Debug::handleMeshChanged(InputGeom* geom)
{
m_geom = geom;
m_inputGeometry = geom;
}
const float* Sample_Debug::getBoundsMin()
@@ -372,12 +372,12 @@ bool Sample_Debug::handleBuild()
m_cset = rcAllocContourSet();
if (!m_cset)
{
m_ctx->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'cset'.");
m_buildContext->log(RC_LOG_ERROR, "buildNavigation: Out of memory 'cset'.");
return false;
}
if (!rcBuildContours(m_ctx, *m_chf, /*m_cfg.maxSimplificationError*/1.3f, /*m_cfg.maxEdgeLen*/12, *m_cset))
if (!rcBuildContours(m_buildContext, *m_chf, /*m_cfg.maxSimplificationError*/1.3f, /*m_cfg.maxEdgeLen*/12, *m_cset))
{
m_ctx->log(RC_LOG_ERROR, "buildNavigation: Could not create contours.");
m_buildContext->log(RC_LOG_ERROR, "buildNavigation: Could not create contours.");
return false;
}
}