Hi Robert, Aaah, Good optimization; I failed to see that. I'm testing your changes right now...
Tanguy -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: Wednesday 10 December 2008 11:21 To: OpenSceneGraph Submissions Subject: Spam: Re: [osg-submissions] FIX: osg::View::computeIntersection withnodepath Hi Tanguy, On Wed, Dec 10, 2008 at 11:11 AM, Tanguy Fautre <[EMAIL PROTECTED]> wrote: > I don't think the "if (nodePath.size()>1)" is necessary, since the > nodePath.empty() has already been tested a few lines before. > Plus it looks like it should be "if (!nodePath.empty())", unless > computeLocalToWorld() is known not to work on an empty path. > > Could you confirm this? It would be safe, but the code I've implemented is more efficient as it avoid a redundant call when the length is only 1. Could you let me know if my changes work fine at your end? Robert. _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org _______________________________________________ osg-submissions mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org
