示例#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;
            }
        }