static void DrawNode(BSPTree tree, BSPNode node) { //Debug.Log("aaaaaa"); GL.Begin(GL.TRIANGLES); GL.Color(new Color(Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f), Random.Range(0.0f, 1.0f), 0.5f)); GL.Vertex(tree.toWorldCoord(node.node.indices[0]) + Vector3.up * 5); GL.Vertex(tree.toWorldCoord(node.node.indices[1]) + Vector3.up * 5); GL.Vertex(tree.toWorldCoord(node.node.indices[2]) + Vector3.up * 5); GL.End(); if (node.frontNode != null) DrawNode(tree, node.frontNode); if (node.backNode != null) DrawNode(tree, node.backNode); }