public void DrawTree(DebugDraw argDraw, int nodeId, int spot, int height) { TreeNode node = m_nodes[nodeId]; node.AABB.GetVertices(drawVecs); color.Set(1, (height - spot) * 1f / height, (height - spot) * 1f / height); argDraw.DrawPolygon(drawVecs, 4, color); argDraw.ViewportTranform.GetWorldToScreen(node.AABB.UpperBound, textVec); argDraw.DrawString(textVec.X, textVec.Y, nodeId + "-" + (spot + 1) + "/" + height, color); if (node.Child1 != TreeNode.NULL_NODE) { DrawTree(argDraw, node.Child1, spot + 1, height); } if (node.Child2 != TreeNode.NULL_NODE) { DrawTree(argDraw, node.Child2, spot + 1, height); } }