public void Clear() { if (IsReadonly) { throw new Exception("Someone was either stuck processing or didn't properly dispose of Enumerator for AABBTree."); } DynamicNodeLookup.Clear(); StaticNodeLookup.Clear(); Root = null; }
public void Rebuild() { if (IsReadonly) { throw new Exception("Someone was either stuck processing or didn't properly dispose of Enumerator for AABBTree."); } DynamicNodeLookup.Clear(); StaticNodeLookup.Clear(); base.ReinitializeTreeFromRootItem(); }
public virtual void Insert(IDynamicObject input) { if (IsReadonly) { throw new Exception("Someone was either stuck processing or didn't properly dispose of Enumerator for AABBTree."); } ValueObserver <BoundingBox> Bounds = input.Bounds; IAABBNode myNewNode = new AABBDynamicDataNode(Bounds, this, input); DynamicNodeLookup.Add(input, myNewNode); Insert(myNewNode); }
public bool Remove(IDynamicObject MyItem) { if (IsReadonly) { throw new Exception("Someone was either stuck processing or didn't properly dispose of Enumerator for AABBTree."); } IAABBNode NodeData; if (DynamicNodeLookup.TryGetValue((Object)MyItem, out NodeData)) { base.RemoveNode(NodeData); DynamicNodeLookup.Remove((Object)MyItem); return(true); } else { return(false); } }