private IEnumerable <GroundNode> GetChildren(GroundNode node) { foreach (var child in node.Children) { if (child.Children.Count == 0) { yield return(child); } else { foreach (var n in GetChildren(child)) { yield return(n); } } } }
private void SplitNode(GroundNode node, int maxLevel) { SplitNodes(new[] { node }, 0, maxLevel); }
public BspTree(Vector2 quadSize, IAppConfig config) { Root = new GroundNode(Vector2.Zero, quadSize, config); }