示例#1
0
 private void ObjectMoved(ProceduralObject item)
 {
     if (item.m_proxyID < 0)
     {
         return;
     }
     m_tree.MoveProxy(item.m_proxyID, ref item.m_boundingBox, Vector3D.Zero);
 }
示例#2
0
 private bool AddToTree(ProceduralObject t)
 {
     if (t.m_proxyID != -1)
     {
         return(false);
     }
     t.m_proxyID  = m_tree.AddProxy(ref t.m_boundingBox, t, 0);
     t.OnMoved   += ObjectMoved;
     t.OnRemoved += RemoveFromTree;
     return(true);
 }
示例#3
0
 private void RemoveFromTree(ProceduralObject t)
 {
     if (t.m_proxyID == -1)
     {
         return;
     }
     m_tree.RemoveProxy(t.m_proxyID);
     t.m_proxyID  = -1;
     t.OnMoved   -= ObjectMoved;
     t.OnRemoved -= RemoveFromTree;
 }