[osg-users] computeIntersections for Slave camera often return false

Robert Osfield robert.osfield at gmail.com
Mon Sep 7 01:10:43 PDT 2015


Hi Ran,

There isn't really any way for us to know what might be wrong as there are
just too many details about what you are doing.

Robert.

On 7 September 2015 at 02:20, Ran Chao <1530904175 at qq.com> wrote:

> Hi,
>
> I got a point (x,y) in a Slave camera image, and i want to know it's
> position in world coords, so i use computeIntersections(), my code:
>
>         osgUtil::LineSegmentIntersector::Intersections intersections;
>         if( !view->computeIntersections(camera.get(),
> osgUtil::Intersector::WINDOW, x, y, intersections) )
>                 return false;
>
>         const osgUtil::LineSegmentIntersector::Intersection& hit =
> *(intersections.begin());
>
>         out_intersect_point = hit.getWorldIntersectPoint();
>
> But computeIntersections() often return false, what's wrong?
>
> Thank you!
>
> Cheers,
> Ran
>
> ------------------
> Read this topic online here:
> http://forum.openscenegraph.org/viewtopic.php?p=65034#65034
>
>
>
>
>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openscenegraph.org/pipermail/osg-users-openscenegraph.org/attachments/20150907/4f473f5f/attachment-0002.htm>


More information about the osg-users mailing list