Re: [Algorithms] fast triangle-segment test *with precomputation*
Brought to you by:
vexxed72
From: <SHA...@ao...> - 2000-08-05 11:55:07
|
In a message dated 05/08/00 01:53:24 !!!First Boot!!!, Chr...@Pl... writes: << 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. >> I am currently doing a triangle/aabb test for an octree implimentation. This test is as near as exact as I can think of. It does 3 tests, each one more time consuming than the last... 1) Are any of the 3 tri vertices inside bbox...if so return true 2) Does any tri edge intersect bbox face...if so return true 3) Generate 8 lines, each one connects a corner of the aabb to it's diagonal opposite then test, does this line intersect tri face...if so return true return false. The last test is in case any corner of the aabb punches through the face of the tri, in which case the tri is technically inside the aabb. How do you do yours?? John. |