예제 #1
0
 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");
     }
 }
예제 #2
0
        private void ReinsertNode(Element <FixtureProxy> qtnode)
        {
            QuadTree.RemoveNode(qtnode);
            QuadTree.AddNode(qtnode);

            if (++_treeMoveNum > TreeUpdateThresh)
            {
                ReconstructTree();
                _treeMoveNum = 0;
            }
        }