Esempio n. 1
0
        /*
         * Functions
         */

        public Form Build(Vector2 rootPosition)
        {
            if (_sim == null)
            {
                _sim = new Simulator();
                _sim.Init();
            }
            else
            {
                _sim.Clear();
            }

            if (_treeInfo == null)
            {
                _treeInfo = new TreeInfo();
            }
            else
            {
                _treeInfo.Clear();
            }

            var p = _sim.MakeParticle(rootPosition);

            MakeBranch(p, baseBranchLength + branchLength.random, 90f, maxDepth);
            return(_sim.ExportForm());
        }