Ejemplo n.º 1
0
 public static void EnumLeafs(DbvtNode root, Collide collideable)
 {
     if (root.IsInternal())
     {
         EnumLeafs(root._children[0], collideable);
         EnumLeafs(root._children[1], collideable);
     }
     else
     {
         collideable.Process(root);
     }
 }
Ejemplo n.º 2
0
 public static void FetchLeafs(Dbvt pdbvt, DbvtNode root, List<DbvtNode> leafs, int depth)
 {
     if (root.IsInternal() && depth != 0)
     {
         FetchLeafs(pdbvt, root._children[0], leafs, depth - 1);
         FetchLeafs(pdbvt, root._children[1], leafs, depth - 1);
         DeleteNode(pdbvt, ref root);
     }
     else
     {
         leafs.Add(root);
     }
 }