Thanks, I got what you mean, I'm gonna try it now. -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Robert Minge Sent: Thursday, December 28, 2006 5:48 PM To: osg users Subject: Re: [osg-users] hide a node
you could use sceneView->setCullMask( 0x01 ) to restrict the culling on those nodes with the node mask 0x01. This prevents the nodes with a different mask from culling and thus from drawing. Robert Minge xiaoshuxing wrote: > Thanks, Robert. > If setNodeMask(0) means hide, setNodeMask(1) means show, then why we need an > int parameter? Why not a Boolean > I just wonder is there any other usages of setNodeMask, or where I can find > the detailed usages of a function? > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Robert Osfield > Sent: Thursday, December 28, 2006 4:14 PM > To: osg users > Subject: Re: [osg-users] hide a node > > node->setNodeMask(0); > > On 12/28/06, xiaoshuxing <[EMAIL PROTECTED]> wrote: >> >> >> >> Thanks >> >> But, oopse, do I have to change my scenegraph tree structure? >> >> Is there any way else? >> >> I've searched the osg examples, seems like that NodeMask can also hide a >> node, but I don't know how to use NodeMask. >> >> The documentation only says that "setNodeMask set the node mask", but no >> specification about what the parameter means. >> >> >> >> ________________________________ >> >> >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> Zach Deedler >> Sent: Thursday, December 28, 2006 12:38 PM >> To: 'osg users' >> Subject: RE: [osg-users] hide a node >> >> >> >> >> Use osg::Switch. Give the node an osg::Switch as its parent and switch it >> off. >> >> >> >> >> Zach >> >> >> >> >> >> ________________________________ >> >> >> From: [EMAIL PROTECTED] >> [mailto:[EMAIL PROTECTED] On Behalf Of >> xiaoshuxing >> Sent: Wednesday, December 27, 2006 21:43 >> To: 'osg users' >> Subject: [osg-users] hide a node >> >> >> What do I need to do if I want to hide a node? By which I mean don't > display >> it and don't delete it either, since I want to show it later. >> _______________________________________________ >> osg-users mailing list >> [email protected] >> http://openscenegraph.net/mailman/listinfo/osg-users >> http://www.openscenegraph.org/ >> >> > _______________________________________________ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/ _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
