RE: [Algorithms] Ray-AABB intersection
Brought to you by:
vexxed72
From: Zhang Z. S. <Zha...@ub...> - 2000-08-10 06:35:53
|
There is an error in the book. But the source i downloaded from the Internet seems right. /* Check final candidate actually inside box */ if (maxT[whichPlane] < 0.) return (FALSE); for (i = 0; i < NUMDIM; i++) if (whichPlane != i) { coord[i] = origin[i] + maxT[whichPlane] *dir[i]; if (coord[i] < minB[i] || coord[i] > maxB[i]) return (FALSE); } else { coord[i] = candidatePlane[i]; } return (TRUE); /* ray hits box */ -----Original Message----- From: Pierre Terdiman [mailto:p.t...@wa...] Sent: Thursday, August 10, 2000 12:03 PM To: gda...@li... Subject: [Algorithms] Ray-AABB intersection Is there any known problem with Andrew Woo's Ray-AABB intersection code? (in Graphic Gems I). It seems to miss some intersections... (?) _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |