Fastest Ray/Box and Triangle/Box intersection test
The title says it all, please tell me the fastest Ray/Box and Triangle/Box intersection test you know.
Thanks.
Tim
--------------------------
glvelocity.gamedev.net
www.gamedev.net/hosted/glvelocity
Tim--------------------------glvelocity.gamedev.netwww.gamedev.net/hosted/glvelocity
2D or 3D? 2D Line box is probably an algorithm I learned in Graphics programming using OpenGL which contains all sorts of this routines. You assign each point four bits of clipping info.
Setting them if the point is left/right/above/below the box. Then you test them using bitwise AND and OR operators. This way you can discard some lines fast. Then you start clipping each point at the appropriate edge each time adjusting the four bits and testing again. Until it is rejected or accepted. Little hard to explain so you should read the book.
Setting them if the point is left/right/above/below the box. Then you test them using bitwise AND and OR operators. This way you can discard some lines fast. Then you start clipping each point at the appropriate edge each time adjusting the four bits and testing again. Until it is rejected or accepted. Little hard to explain so you should read the book.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement