Esempio n. 1
0
        public IEnumerable <BSPTree> GetLeaves()
        {
            if (this.IsLeafNode)
            {
                return(Enumerables.Single(this));
            }

            var firstLeaves  = this.FirstChild.GetLeaves();
            var secondLeaves = this.SecondChild.GetLeaves();

            return(firstLeaves.Concat(secondLeaves));
        }