public bool RemoveByGuid(Guid guid, SceneNode item, BoundableNodeOctree root) { if (root.OctantDictionary.ContainsKey(guid)) { (OctantDictionary[guid] as BoundableNodeOctree).RemoveSafe(item, root); return(true); } else { return(false); } }
private BoundableNodeOctree RebuildOctree(IEnumerable <SceneNode> items) { Clear(); if (items == null) { return(null); } var tree = new BoundableNodeOctree(items.ToList(), Parameter); tree.BuildTree(); if (tree.TreeBuilt) { foreach (var item in items) { SubscribeBoundChangeEvent(item); } } return(tree.TreeBuilt ? tree : null); }
private void UpdateOctree(BoundableNodeOctree tree) { Octree = tree; mOctree = tree; }