RE: [Algorithms] fast triangle-segment test *with precomputation*
Brought to you by:
vexxed72
From: Charles B. <cb...@cb...> - 2000-08-05 02:17:00
|
Urgh; of course you're right; boxes that are outside but near the corners are classified wrong. I think you could probably detect that case and handle it from there; eg. when the box straddles two edge planes, look at the vertex those planes share, and then test whether the box is away or towards the center of the triangle relative to that vertex (or something). At 06:51 PM 8/4/2000 -0700, you wrote: > > > > >Charles Bloom wrote: >>Ok, you have a good point, but isn't it even simpler than that? >> >>I have one plane for the triangle, and 3 planes through the edges that >>are perpendicular to the plane of the triangle. >> >>To test for bbox-triangle do : >> >>1. bbox must intersect the plane of the triangle. >>2. bbox must be intersect or behind all 3 edge planes. >> >>That's it ! Four tests, all of them providing great quick-rejection. >>This is simpler, I guess, because my BBox is not moving, and I guess >>you're doing moving-BBox tests like Quake. > >That only works as a conservative test, but not as an exact test. > >If the box, straddling the triangle plane, is just outside one of the >vertices of the triangle, then both criteria are met, but there's no >actual intersection. > > >Christer Ericson >SCEA, Santa Monica > > > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > > -------------------------------------- Charles Bloom www.cbloom.com |