RE: [Algorithms] fast triangle-segment test *with precomputation*
Brought to you by:
vexxed72
From: Ignacio C. <i6...@ho...> - 2000-08-05 01:37:02
|
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. yes, i'm calculating the intersection between triangles and moving bboxes, for that reason i need the axis aligned planes so that the box slides over triangle vertexes. The good thing of this algorithm is that you clip the movement segment, and for this reason you don't have to iterate and test for intersection recursively. Also the axis aligned planes allow me to do fast rejection of the segment, so at the end the only added cost is the antiplane, that is the last check, and usually doesn't happen. Ignacio Castano ca...@cr... |