Re: [osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-04 Thread Sanat Talmaki
Thanks Tom. I will try that out. Cheers, Sanat. -- Read this topic online here: http://forum.openscenegraph.org/viewtopic.php?p=37342#37342 ___ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.or

Re: [osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-04 Thread Tom Pearce
Hi Sanat, Code: const osg::NodePath& nodePath = picker->getFirstIntersection().nodePath; is only giving you the first intersection, which may not be either of your models (it could be terrain, for example). I'm guessing you need to search the entire set rather than just trying the first inte

Re: [osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-04 Thread Sanat Talmaki
Hi Tom, My scene graph structure is: Root-->Terrain Root-->group1-->model1 -->autotransform1 -->shapefileNode1 Root-->group2-->model2 -->autotransform2 -->shapefileNode2 I am trying to pick for model1 and model

Re: [osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-03 Thread Tom Pearce
osg::NodePath is: typedef std::vector< Node* > osg::NodePath Since you have two Node*s that you're looking for, you can iterate through the NodePath just like any other vector and compare your pointer to the pointers in the vector. You could also apply your intersection visitor to the nodes you

[osg-users] Trouble Understanding osgPick (pick example QSG)

2011-03-03 Thread Sanat Talmaki
Hi, I have read through the example in the QSG (quick start guide) as well as example programs for the Picking behavior. I know how the eventAdapter, handle(), etc works. My problem is: In my ctor for picking class I set the two nodes for which I want to check if any of them have been picked.