/// <summary> /// Impresion recursiva /// </summary> private void doPrintDebugOctree(OctreeNode node, int index, StringBuilder sb) { if (node == null) { return; } String lineas = ""; for (int i = 0; i < index; i++) { lineas += "-"; } if (node.isLeaf()) { if (node.models.Length > 0) { sb.Append(lineas + "Models [" + node.models.Length + "]" + "\n"); } else { sb.Append(lineas + "[0]" + "\n"); } } else { sb.Append(lineas + "\n"); index++; for (int i = 0; i < node.children.Length; i++) { doPrintDebugOctree(node.children[i], index, sb); } } }
private void obtenerEstadisticas(OctreeNode node, ref int minModels, ref int maxModels) { if (node.isLeaf()) { int n = node.models.Length; if (n < minModels) { minModels = n; } if (n > maxModels) { maxModels = n; } } else { for (int i = 0; i < node.children.Length; i++) { obtenerEstadisticas(node.children[i], ref minModels, ref maxModels); } } }
private void obtenerEstadisticas(OctreeNode node, ref int minModels, ref int maxModels) { if (node.isLeaf()) { int n = node.models.Length; if (n < minModels) minModels = n; if (n > maxModels) maxModels = n; } else { for (int i = 0; i < node.children.Length; i++) { obtenerEstadisticas(node.children[i], ref minModels, ref maxModels); } } }