Hi Tanguy,

I'm just reviewing your changes.  The const changes is good and I'll
go ahead an merge this.  The change from to use
computeLocalWorldToLocal() also looks sounds as the code later does an
inverse of the associated matrix to get from window coords into local
coords.

The pruning of the last element in the nodepath also looks the
sensible thing to do, but the way you've coded it doesn't look safe to
me, as it won't handle the case of nodepath being empty.   I'll
refactor this code to automatically detect such cases.

The change at line 99 looks redundant - changing from using
matrix.preMultScale to preMult(Matrix::scale()), if it it's it
suggests a bug in preMultScale that needs to be addressed.  Is this
change just an experiment to see if made a difference or did you
really see a bug with the original code at line 99?

Robert.

On Fri, Dec 5, 2008 at 2:33 PM, Tanguy Fautre
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> This is based on OSG 2.6.1.
>
> bool View::computeIntersections(
>        float x,float y,
>        osg::NodePath& nodePath,
>        osgUtil::LineSegmentIntersector::Intersections& intersections,
>        osg::Node::NodeMask traversalMask)
>
> is currently, as far as I can tell, broken in several ways:
>
> - Matrix computation is incorrect, it should be computeLocalToWorld()
> and not computeWorldToLocal().
> - Last node of the node path should be ignored; otherwise it can lead to
> applying a transformation node twice.
> - nodePath argument should be const
>
>
> I'm attaching an updated version that fixes these 3 issues. I've tested
> it on a complex scenegraph featuring several level of transformations,
> and it is now working fine.
>
>
> Regards,
>
> Tanguy
>
>
> _______________________________________________
> 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

Reply via email to