[osg-users] computeIntersections for Slave camera often return false
Ran Chao
1530904175 at qq.com
Sun Sep 6 18:20:04 PDT 2015
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
More information about the osg-users
mailing list