Hi Renan -- Sounds like maybe you don't have the complete source? You can download it from here: http://www.skew-matrix.com/OSGQSG/index.html You say calling the method in _selectedNode "doesn't seem to work very well" but you haven't told me how it fails so that's tough to diagnose. Does it compile? If so, does it crash because the pointer is NULL? You said your sphere was a "shape". Do you mean a ShapeDrawable? If so, I believe the Intersector classes are limited to picking Geometry classes... not sure, check the code. Hope that helps, Paul Martz Skew Matrix Software LLC http://www.skew-matrix.com <http://www.skew-matrix.com/> 303 859 9466
_____ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Renan Mendes Sent: Tuesday, November 06, 2007 4:15 PM To: OpenSceneGraph Users Subject: Re: [osg-users] PickHandler Class on Quick Start Guide Hi, there, Paul. I have tried to adapt your PickHandler class to solve my specific problem, but I couldn't. Please, help me out. Honestly I haven't completely understand it (when you check for Intersections and stuff like this) but I imagined that all I had to do was to put my own methods after the "if (_selectedNode.valid())" condition. Well, let me elaborate a little bit more on my software's current situation. There is a Point class, that is osg::MatrixTransform's daughter. Each Point's instance has a geode child, which carries a sphere with a certain color. What I need to do is change the sphere's color after this shape was selected by mouse picking. I've tried creating a method changeColor, that belonged to the Point class, and I've made the PickHandler a daughter of that class, so that it would have access to the method. Specifics of the method aside, what do I have to do to call that method? Is it simply by writing "_selectedNode->changeColor();" in the above mentioned condition's nest? That doesn't seem to work very well.... Do I have to declare _selectedNode as a global variable before the definition of the class? If yes, what kind o pointer would it be? By answering this, you'll make someone eternally grateful to you! Renan M Z Mendes
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

