I'd like to visualize a BSP tree. To do this, I need to project an arbitrary euclidean plane onto a projection plane. I was thinking about calculating the intersections of the plane with the viewing frustum (in world space), then triangulating the resulting quadrangle and projecting the 2 triangles.
Is there a better way? For example, I thought about transforming the plane into the viewing space first, creating an
ONB (from the transformed plane normal). Then I would simply stretch the quadrangle, until it is outside of the frustum and transform the quadrangle back into world space and send it into the rendering queue.
How should I got about shading the plane approximation (quadrangle)?