Пример #1
0
        /*
         # The Weber/Penn splitting method is problematic for big splitting angles, or
         # may be i misunderstood it, but it seems, that evenly splitting like for
         # an umbrella formed acacia (don't know the english name of that trees) isn't
         */

        public override bool traverseTree(CS_TreeTraversal traversal)
        {
            if (traversal.enterStem(this))  // enter this tree?
            {
                if (leaves != null)
                {
                    foreach (CS_Leaf l in leaves)
                    {
                        l.traverseTree(traversal);
                    }
                }

                if (substems != null)
                {
                    foreach (CS_Stem s in substems)
                    {
                        s.traverseTree(traversal);
                    }
                }

                if (clones != null)
                {
                    foreach (CS_Stem s in clones)
                    {
                        s.traverseTree(traversal);
                    }
                }
            }

            return(traversal.leaveStem(this));
        }
Пример #2
0
        public override bool traverseTree(CS_TreeTraversal traversal)
        {
            if (traversal.enterTree(this))  // enter this tree?
            {
                foreach (CS_Stem stem in trunks)
                {
                    stem.traverseTree(traversal);
                }
            }

            return(traversal.leaveTree(this));
        }
Пример #3
0
 /**
  * used with TreeTraversal interface
  *
  * @param traversal
  * @return when false stop traverse tree at this level
  */
 public abstract bool traverseTree(CS_TreeTraversal traversal);
Пример #4
0
        /*
         # The Weber/Penn splitting method is problematic for big splitting angles, or
         # may be i misunderstood it, but it seems, that evenly splitting like for
         # an umbrella formed acacia (don't know the english name of that trees) isn't
         */
        public override bool traverseTree(CS_TreeTraversal traversal)
        {
            if (traversal.enterStem(this))  // enter this tree?
            {

                if (leaves != null)
                {
                    foreach (CS_Leaf l in leaves)
                        l.traverseTree(traversal);
                }

                if (substems != null)
                {
                    foreach (CS_Stem s in substems)
                        s.traverseTree(traversal);
                }

                if (clones != null)
                {
                    foreach (CS_Stem s in clones)
                        s.traverseTree(traversal);
                }
            }

            return traversal.leaveStem(this);
        }
Пример #5
0
 /**
  * used with TreeTraversal interface
  *
  * @param traversal
  * @return when false stop traverse tree at this level
  */
 public abstract bool traverseTree(CS_TreeTraversal traversal);
Пример #6
0
        public override bool traverseTree(CS_TreeTraversal traversal)
        {
            if (traversal.enterTree(this))  // enter this tree?
            {
                foreach (CS_Stem stem in trunks)
                {
                    stem.traverseTree(traversal);
                }
            }

            return traversal.leaveTree(this);
        }
Пример #7
0
 /* (non-Javadoc)
  * @see net.sourceforge.arbaro.tree.TraversableLeaf#traverseTree(net.sourceforge.arbaro.tree.TreeTraversal)
  */
 public override bool traverseTree(CS_TreeTraversal traversal)
 {
     return traversal.visitLeaf(this);
 }
Пример #8
0
 /* (non-Javadoc)
  * @see net.sourceforge.arbaro.tree.TraversableLeaf#traverseTree(net.sourceforge.arbaro.tree.TreeTraversal)
  */
 public override bool traverseTree(CS_TreeTraversal traversal)
 {
     return(traversal.visitLeaf(this));
 }