• Advertisement
Sign in to follow this  

Clipping a plane to the view frustum

This topic is 1931 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello all,

I am currently trying to accomplish what the title states: Take a plane, represented as a 4D vector, and clip it to the view frustum so that it forms a bounding area. Here is what I am thinking, I just want to make sure this make sense:

1. Transform the view frustum's 6 planes by the camera's view matrix.
2. for each frustum plane, find the intersection point between the current frustum plane, an adjacent frustum plane, and the plane I am looking to clip. Assuming that they meet at only one point, I would recored this point and move on.
3. Wind the points found to form a bounding area.

This seems like it's a bit overcomplicated and contains a lot of math (such as transforming each view frustum plane). Does this make sense? Is there any easier way to do this?

Thanks.

Share this post


Link to post
Share on other sites
Advertisement
I think it will be easier to take all edges (i.e. line segments) of frustum, find the intersection points of these and your plane (you have 0 or 1 intersection point for each segment) and then wind those points.

Share this post


Link to post
Share on other sites
[quote name='Lauris Kaplinski' timestamp='1349357539' post='4986758']
I think it will be easier to take all edges (i.e. line segments) of frustum, find the intersection points of these and your plane (you have 0 or 1 intersection point for each segment) and then wind those points.
[/quote]

This is a helpful improvement, thank you.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement