public void RemoveProxy(int proxyId) { if (_idRegister.ContainsKey(proxyId)) { Element <FixtureProxy> qtnode = _idRegister[proxyId]; UnbufferMove(qtnode); _idRegister.Remove(proxyId); _quadTree.RemoveNode(qtnode); } else { throw new KeyNotFoundException("proxyID not found in register"); } }
private void ReinsertNode(Element <FixtureProxy> qtnode) { QuadTree.RemoveNode(qtnode); QuadTree.AddNode(qtnode); if (++_treeMoveNum > TreeUpdateThresh) { ReconstructTree(); _treeMoveNum = 0; } }