I’m working on a CAD package. One of the features in the app is the ability to define a clipping plane to “slice” a model to allow the user to view to the internal structure. The interface renders this clipping plane with a translucent quad so that the user knows the location of the clipping plane. The user can then use a slider control to move the clipping plane through the model. Everything works great until I received the request to allow the user define a custom vector for the clipping plane as opposed to the XY Plane, XZ Plane, or YZ plane that I’ve already implemented.
The actual clipping of the model is easy. I’m running into difficulty drawing the quad representing the clipping plane. I know the bounding box of the model, and I know the vector of the plane. How do I determine the four corners of the quad. Has someone out there done something similar to this that can help?