void Sample_SoloMesh::handleMeshChanged(class InputGeom* geom)
{
	Sample::handleMeshChanged(geom);

	dtFreeNavMesh(m_navMesh);
	m_navMesh = 0;

	if (m_tool)
	{
		m_tool->reset();
		m_tool->init(this);
	}
	resetToolStates();
	initToolStates(this);
}
示例#2
0
void CMaNGOS_Map::ClearAllGeoms()
{
    delete m_MapInfos;
    m_navMesh = NULL;
    m_navQuery = NULL;

    setTool(new NavMeshTesterTool);

    if (m_SelectedTile)
    {
        delete m_SelectedTile;
        m_SelectedTile = NULL;
    }
    initToolStates();
    resetToolStates();
}
void Sample_TempObstacles::handleMeshChanged(class InputGeom* geom)
{
    Sample::handleMeshChanged(geom);

    dtFreeTileCache(m_tileCache);
    m_tileCache = 0;

    dtFreeNavMesh(m_navMesh);
    m_navMesh = 0;

    if (m_tool)
    {
        m_tool->reset();
        m_tool->init(this);
        m_tmproc->init(m_geom);
    }
    resetToolStates();
    initToolStates(this);
}
void Sample_TileMesh::handleMeshChanged(InputGeom* geom)
{
	Sample::handleMeshChanged(geom);

	const BuildSettings* buildSettings = geom->getBuildSettings();
	if (buildSettings && buildSettings->tileSize > 0)
		m_tileSize = buildSettings->tileSize;

	cleanup();

	dtFreeNavMesh(m_navMesh);
	m_navMesh = 0;

	if (m_tool)
	{
		m_tool->reset();
		m_tool->init(this);
	}
	resetToolStates();
	initToolStates(this);
}