Advertisement

Building a Frustum from a poly, How ??

Started by February 10, 2003 05:59 PM
3 comments, last by ogracian 22 years ago
Hello Could someone please explain me how can I build a frustum from a polygon(actually a rectangle), or maybe point me to some docs which explain the maths behind building a frustum from a polygon. Thanks in advance, Oscar
What do you mean build a frustum from a polygon? Do you mean you want a projective transformation for the view frustum which will render into a specific quad on the screen? Or just build a geometric object?

"Math is hard" -Barbie
"Math is hard" -Barbie
Advertisement
Hi

Hope this clariffy my question:

I am trying to code a Function for my portal engine which define my frustum clipping planes from my portal shape which is a simple rectangle.

Thats why im askig how can I build a frustum (clipping planes) from a poly(my portal)

Regards,
Oscar
Take your rectangle and your viewer''s position.
This builds a "pyramid". So you''ll have to take your position and
for every edge of the rectangle define a plane.
You''ll get 4 planes + the plane which is defined by your rectangle. Whatever lies within these planes is visible from your viewer''s position through the portal.
Wanna all the math ?
Hi

Thanks for your help, I got it working now! : )

Regards,
Oscar

This topic is closed to new replies.

Advertisement