Example #1
0
    public Quad[] GetDecendants(Quad root)
    {
        List <Quad> descendants = new List <Quad>();

        if (root.HasChildren)
        {
            foreach (Quad child in root.GetChildren())
            {
                if (child != null)
                {
                    descendants.AddRange(GetDecendants(child));
                }
            }
        }

        descendants.Add(root);

        return(descendants.ToArray());
    }