Пример #1
0
 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);
             }
         }
     }
 }
Пример #2
0
 private void SplitNode(GroundNode node, int maxLevel)
 {
     SplitNodes(new[] { node }, 0, maxLevel);
 }
Пример #3
0
 public BspTree(Vector2 quadSize, IAppConfig config)
 {
     Root = new GroundNode(Vector2.Zero, quadSize, config);
 }