Ejemplo n.º 1
0
void CUniformGrid::RemoveBody(CGameNode * node)
{
	const int Idx = node->GetGridIndex();
	if (-1 != Idx)
	{
		NodeVector * cellList = (m_GridArray + Idx);
		NodeVector::iterator it = cellList->begin();

		while (cellList->end() != it)
		{
			if (node == (*it))
			{
				cellList->erase(it);
				return;
			}

			++it;
		}
	}
}