Thanks Rafa. That's what I'm already doing...I was hoping for a more elegant 
solution than dynamic casting... 

I'm surpised there's no such thing as osg::Node::_type where _type is a 
compound of different flags to test against. 

- Nick -


----------------------------------------
> Date: Mon, 27 Aug 2007 09:34:04 +0200
> From: [EMAIL PROTECTED]
> To: [email protected]
> Subject: Re: [osg-users] Switch Group Detection
> 
> Hi Nick,
> 
> try this:
> 
> osg::Switch *myswitch = dynamic_cast(node);
> if(myswitch)
>    // is a switch
> else
>   // is not a switch
> 
> 
> Rafa.
> 
> 
> On 8/27/07, Nick Prudent  wrote:
> > Newbie question:
> >
> > How do you find out if a osg:Group node is a Switch? Node::asGroup() can be
> > used to determine if thi is a osg::Group, but what about osg::Switch ?
> >
> > Thanks,
> >
> > - Nick -
> >
> > _________________________________________________________________
> > Put Your Face In Your Space with Windows Live Spaces
> > http://spaces.live.com/?mkt=en-ca
> >
> > _______________________________________________
> > osg-users mailing list
> > [email protected]
> > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
> >
> 
> 
> -- 
> Rafael Gaitán Linares
> Instituto de Automática e Informática Industrial  http://www.ai2.upv.es
> Ciudad Politécnica de la Innovación
> Universidad Politécnica de Valencia
> _______________________________________________
> osg-users mailing list
> [email protected]
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

_________________________________________________________________
Connect to the next generation of MSN Messenger 
http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to