[osg-users] How to select or pick an object in OSG?
hesicong2006 at 163.com
Thu Sep 6 07:05:30 PDT 2007
I'm new to OSG and now I 'm trying to do picking (or say selecting) in
OSG. I create a scene by 3DSMAX. It contains a teapot, a box. And then
it is exported by OSGExp to IVE format.
I loaded this scene in my program. I create an PickHandler just like the
The core pick function is:
void PickHandler::pick(osgViewer::Viewer* viewer, const
else if (hitr->drawable.valid())
I notice that the osgUtil::LineSegmentIntersector::Intersections gives
me only the drawable list but the object list. My aim is to pick the
"object" (teapot or the box), but it pick the drawable only. And how can
I pick the object?
Thanks very much for your reply!
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the osg-users