Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualTrienco

Posted 27 December 2012 - 12:39 AM

Just to be sure, is trapezoid considered a plane?
A plane is infinite and therefore has no "shape" (unless you consider being flat a shape). A trapezoid has its name because of it's shape. So no, it's not a plane, but it is _on_ a plane.

For above reasons a plane doesn't have "corners" either, you simply need to have three points to define a plane.

You can use a plane to quickly filter out all objects that aren't intersecting the plane your trapezoid is on, but you still need to check if they are actually inside or intersecting the actual shape. The easiest way I could think of is to do 4 more plane tests for each edge of your shape to see if an object either intersects or is inside.

So basically it's exactly the same as frustum culling, except that you have a special case where the top and bottom plane of the view frustum happen to be the same. You could safe yourself one of the 6 plane checks (top and bottom are the same, there is no "inside" in that dimension and so the result of checking for objects "between" top and bottom is the same as objects intersecting either).

If you already have code that does frustum culling, I'd probably not even waste time to write any new code for this particular special case and just use that instead.

#1Trienco

Posted 27 December 2012 - 12:39 AM

Just to be sure, is trapezoid considered a plane?

 

A plane is infinite and therefore has no "shape" (unless you consider being flat a shape). A trapezoid has its name because of it's shape. So no, it's not a plane, but it _is_ on a plane.

 

For above reasons a plane doesn't have "corners" either, you simply need to have three points to define a plane.

 

You can use a plane to quickly filter out all objects that aren't intersecting the plane your trapezoid is on, but you still need to check if they are actually inside or intersecting the actual shape. The easiest way I could think of is to do 4 more plane tests for each edge of your shape to see if an object either intersects or is inside.

 

So basically it's exactly the same as frustum culling, except that you have a special case where the top and bottom plane of the view frustum happen to be the same. You could safe yourself one of the 6 plane checks (top and bottom are the same, there is no "inside" in that dimension and so the result of checking for objects "between" top and bottom is the same as objects intersecting either).

 

If you already have code that does frustum culling, I'd probably not even waste time to write any new code for this particular special case and just use that instead.


PARTNERS