public void Descript(FractalSystemNode node, int depth) { if (node.growRate < iterGrowRate) { stoppedCount++; node.ClearNode(); return; } if (depth >= iterationMax) { //因为在这个工程中,只会渲染整棵树,所以不需要下面串起来的链表。 node.ClearNode(); return; } if (node.child.Count == 0)//这个节点还没有展开过 { node.generateChildren(); } //node.updateChildren(); foreach (FractalSystemNode child in node.child) { Descript(child, depth + 1); } //同样因为没有链表,所以不用进行后续的处理。 }
public void Descript(FractalSystemNode node, int depth) { // Check terminating conditions if (node.growRate < iterGrowRate) { return; } if (depth >= iterationMax) { node.ClearNode(); return; } // Expand the node if it have not been expanded. if (node.child.Count == 0) { node.generateChildren(); } foreach (FractalSystemNode child in node.child) { Descript(child, depth + 1); } }