Ejemplo n.º 1
0
        /**
         * For every stem there is a box (as minPoint, maxPoint),
         * within the stem with all it's substems of any level
         * should be contained. The box is calculated by invoking
         * this method for every point limiting a stem segment.
         * If such point of a stems segment of substems segment
         * is outside of the box, the box is adapted.
         *
         * @param pt The point which should be inside of the containing box
         */

        public void minMaxTest(Vector3 pt)
        {
            // TODO
            Vector3.Max(maxPoint, pt);
            Vector3.Min(minPoint, pt);

            if (clonedFrom != null)
            {
                clonedFrom.minMaxTest(pt);
            }
            if (parent != null)
            {
                parent.minMaxTest(pt);
            }
            else
            {
                // no parent, this must be a trunk
                tree.minMaxTest(pt);
            }
        }
Ejemplo n.º 2
0
 void minMaxTest()
 {
     stem.minMaxTest(getUpperPosition());
     stem.minMaxTest(getLowerPosition());
 }