Re: [Algorithms] Ray-AABB intersection
Brought to you by:
vexxed72
From: <Chr...@Pl...> - 2000-08-10 23:57:34
|
Pierre, do you need the intersection point to be calculated or are you merely interested in the boolean hit/miss result? If the latter, you can use a separating axis approach, which is quite cheap (relatively). For a description (with pseudo code), see the paper: Arthur Gregory, Ming C. Lin, Stefan Gottschalk, Russell Taylor "A Framework for Fast and Accurate Collision Detection for Haptic Interaction" Christer Ericson SCEA, Santa Monica "Pierre Terdiman" <p.t...@wa...>@lists.sourceforge.net on 08/10/2000 02:51:59 PM Please respond to gda...@li... Sent by: gda...@li... To: <gda...@li...> cc: Subject: Re: [Algorithms] Ray-AABB intersection Weird. Looks like mine, but it still doesn't work well. ......ok once again I think I'd better rederive everything from scratch and write my own, yeepa.... (sigh) ----- Original Message ----- From: Zhang Zhong Shan <Zha...@ub...> To: <gda...@li...> Sent: Thursday, August 10, 2000 8:36 AM Subject: RE: [Algorithms] Ray-AABB intersection > 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 > > _______________________________________________ > GDAlgorithms-list mailing list > GDA...@li... > http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list _______________________________________________ GDAlgorithms-list mailing list GDA...@li... http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list |