No Need to become complex here, I suggest the following: 1) Create one sphere which is outside of the switch node and at the same position as the sphere inside the switch node (the one you want to turn on/off) 2) Apply a completely transparent material (alpha value) to the sphere outside the switch. So its invisible to the eye (but not to the intersection visitor). 3) Whenever you hit the invisible sphere, turn the switch to true and make the sphere inside the switch visible.
Dimi ----- Original Message ---- From: Gordon Tomlinson <[EMAIL PROTECTED]> To: OpenSceneGraph Users <[email protected]> Sent: Monday, July 7, 2008 3:47:14 PM Subject: Re: [osg-users] is there a way to select an invisible object? If you write your own intersection visitor or extend one then YOU can do want when your visitor hits a osg::Switch node -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Gianluca Natale Sent: Monday, July 07, 2008 8:23 AM To: 'OpenSceneGraph Users' Subject: Re: [osg-users] is there a way to select an invisible object? Hi Robert. What I mean is: I have a scene made of 3 spheres, each attached under a different switch node. The first two spheres are visible (their switches are turned on), while the third is not (so its switch is turned off). I would like to select also the third sphere (imagine for example that I want the third sphere to be visible only when the mouse is over it), even when it is invisible. Thanks, Gianluca -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield Sent: lunedì 7 luglio 2008 11.35 To: OpenSceneGraph Users Subject: Re: [osg-users] is there a way to select an invisible object? Hi Gianluca, What do you mean by "select" and object? What type of object? Robert. On Mon, Jul 7, 2008 at 10:24 AM, Gianluca Natale <[EMAIL PROTECTED]> wrote: > Hi All! > > I'm using OSG to implement my own scene graph to draw my scene on the > screen. > Sometimes I would need to select an object even if it is invisible (I > mean that the switch node it is attached to is set to off). But this > seems impossible to me, because I don't want to draw the object, so I > have to disable that switch. > On the other hand, if I disable the switch, how can I select it (with > the standard OpenGL picking mechanism)? > Do I have to duplicate the scene graph, one for selection and the > other for drawing? > > Thank you in advance for your suggestions. > Gianluca Natale > > > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph. > org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org No virus found in this incoming message. Checked by AVG - http://www.avg.com Version: 8.0.138 / Virus Database: 270.4.5/1536 - Release Date: 7/5/2008 10:15 AM _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

