public void ProcessCell(List<int> indexes, List<int> tri_count, float threshold)
{
if (type == NodeType.Internal)
{
for (int i = 0; i < 8; i++)
{
if (children[i] != null)
children[i].ProcessCell(indexes, tri_count, threshold);
}
if (index == 31681)
{
}
for (int i = 0; i < 12; i++)
{
OctreeNode[] face_nodes = new OctreeNode[2];
int c1 = Utilities.TEdgePairs[i, 0];
int c2 = Utilities.TEdgePairs[i, 1];
face_nodes[0] = children[c1];
face_nodes[1] = children[c2];
ProcessFace(face_nodes, Utilities.TEdgePairs[i, 2], indexes, tri_count, threshold);
}
for (int i = 0; i < 6; i++)
{
OctreeNode[] edge_nodes =
{
children[Utilities.TCellProcEdgeMask[i, 0]],
children[Utilities.TCellProcEdgeMask[i, 1]],
children[Utilities.TCellProcEdgeMask[i, 2]],
children[Utilities.TCellProcEdgeMask[i, 3]]
};
ProcessEdge(edge_nodes, Utilities.TCellProcEdgeMask[i, 4], indexes, tri_count, threshold);
}
}
}