private void ObjectMoved(ProceduralObject item) { if (item.m_proxyID < 0) { return; } m_tree.MoveProxy(item.m_proxyID, ref item.m_boundingBox, Vector3D.Zero); }
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); }
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; }