[osg-users] is there a way to select an invisible object?

Gianluca Natale gianluca.natale at adstorino.it
Mon Jul 7 07:27:36 PDT 2008


I'll try.
Thank you.

Gianluca

-----Original Message-----
From: osg-users-bounces at lists.openscenegraph.org
[mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Robert
Osfield
Sent: lunedì 7 luglio 2008 15.54
To: OpenSceneGraph Users
Subject: Re: [osg-users] is there a way to select an invisible object?

Hi Gianulca,

If you want your subgaphs to respond to different traversals in
different ways then it's best to use node->setNodeMask(mask) and
nodevisitor->setTraversalMask(mask) in combination.  In your case you
could set your "invsible" subgraphs to 0x1, and pick these out with an
intersect visitor a mask of 0xffffffff, and a cull mask of 0x2.

Robert.

On Mon, Jul 7, 2008 at 1:22 PM, Gianluca Natale
<gianluca.natale at adstorino.it> wrote:
> 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: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] 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
> <gianluca.natale at adstorino.it> 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
>> osg-users at lists.openscenegraph.org
>> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>>
>>
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> 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
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
_______________________________________________
osg-users mailing list
osg-users at lists.openscenegraph.org
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




More information about the osg-users mailing list