Clipping a plane to the view frustum

Started by
1 comment, last by metsfan 11 years, 6 months ago
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.
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.
Lauris Kaplinski

First technology demo of my game Shinya is out: http://lauris.kaplinski.com/shinya
Khayyam 3D - a freeware poser and scene builder application: http://khayyam.kaplinski.com/

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.


This is a helpful improvement, thank you.

This topic is closed to new replies.

Advertisement