intersection between a box and a ray

Started by
3 comments, last by seb_B 22 years, 4 months ago
hi, does anybody know a site, documents, or source code about intersection between a ray and a box ? thx
Advertisement
try searching the forums, since this question has been asked a lot recently.
i haven''t found :''(
you basically would the plane frome each face of the box with the ray, so it is a simply ray-plane intersection test. you also have to make sure the intersection is between the extents of the box, so just check if the intersection is between minx,miny and maxx,maxy for the face it intersected. i think that should do it.
took me 15 seconds on dogpile.com (plus, i just got them to donate some food for the holidays)

http://www.siggraph.org/education/materials/HyperGraph/raytrace/rtinter3.htm

this is a pretty quick explanation, but with a little more searching you should be able to find something even more detailed

This topic is closed to new replies.

Advertisement