public static void ProcessEdge(OctreeNode[] nodes, int direction, List<int> indexes)
{
if (nodes[0] == null || nodes[1] == null || nodes[2] == null || nodes[3] == null)
return;
if (nodes[0].type != OctreeNodeType.Internal && nodes[1].type != OctreeNodeType.Internal && nodes[2].type != OctreeNodeType.Internal && nodes[3].type != OctreeNodeType.Internal)
{
ProcessIndexes(nodes, direction, indexes);
}
else
{
for (int i = 0; i < 2; i++)
{
OctreeNode[] edge_nodes = new OctreeNode[4];
for (int j = 0; j < 4; j++)
{
if (nodes[j].type == OctreeNodeType.Leaf || nodes[j].type == OctreeNodeType.Pseudo)
edge_nodes[j] = nodes[j];
else
edge_nodes[j] = nodes[j].children[edgeProcEdgeMask[direction, i, j]];
}
ProcessEdge(edge_nodes, edgeProcEdgeMask[direction, i, 4], indexes);
}
}
}