From: Thomas K. <t.k...@gm...> - 2012-04-26 09:42:56
|
Thanks for your quick reply Sebastian. Found the patch you mentioned, think it'd be a valuable addition, at this moment the LineSeg is implicitly casted to Ray, which makes for t<1 not being maintained, whereas it is for the single-sided intersection. Kind regards, Thomas On Thu, Apr 26, 2012 at 11:24 AM, Sebastian Messerschmidt < seb...@gm...> wrote: > Hallo Thomas, > > I've already submitted a patch for the doublesided lineseg and it might be > included > Without diving into the code, there might be two reasons for the > temporary. First one is prevent the compiler from aliasing the const > reference which improves performance in most cases. > Second reason might be a linesegment has to be handled differently > regarding the tIn/tOut in the intersection testing. > I would rather wait for Patrick to review my patches, that one includes a > double sided intersection for tri/lineseg that we have been using in our > project for more than one year now. > > Hi, > > In the intersection code for a Tri and a LineSeg I read the following in > Intersection.h on line 905 > | Ray<DATA_TYPE> temp( lineseg.getOrigin(), lineseg.getDir() ); > I don't understand the reason for this temporary copy and to what extent > 'temp' is different from 'lineseg'. > > If I wanted to have a double-sided Tri-LineSeg intersection would it be > enough to change > | bool result = intersect( tri, temp, u, v, t ); > to > | bool result = intersectDoubleSided( tri, temp, u, v, t ); > on line 906? > > I hope some can shed some light onto my two questions. Thanks in advance. > > Kind regards, > Thomas > > > > > ------------------------------------------------------------------------------ > Live Security Virtual Conference > Exclusive live event will cover all the ways today's security and > threat landscape has changed and how IT managers can respond. Discussions > will include endpoint security, mobile security and the latest in malware > threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ > > > > _______________________________________________ > ggt-info mailing lis...@li...https://lists.sourceforge.net/lists/listinfo/ggt-info > > > |