Re: [osg-users] Hiding and Showing a Node with Key Press

2011-02-19 Thread Ross Lance
Thanks that did the trick. Just for other's reference this is what worked well for me using setNodeMask(): // Keyboard Event Handler to Show/Hide Node class HideQuadKeyboardEventHandler : public osgGA::GUIEventHandler { public: HideQuadKeyboardEventHandler(osg::Node* node) { _node = no

Re: [osg-users] Hiding and Showing a Node with Key Press

2011-02-18 Thread Judson Weissert
If you associate a node mask to each type of node that may need to be hidden using setNodeMask(), you can then modify the cull mask of the camera to show/hide the nodes accordingly. osg::Camera::setCullMask (mask) - would be called when the keyboard button is pressed. osg::Node::setNodeMask (m

Re: [osg-users] Hiding and Showing a Node with Key Press

2011-02-18 Thread Ralf Stokholm
node()->setNodeMask(visible ? ~0 : 0); should do it On 18 February 2011 19:45, Ross Lance wrote: > All, > > I am trying to setup a keyboard event to toggle a particular node on and > off. I am not sure if I should use osg::Switch node or node masks? Any > suggestions or examples you could point

[osg-users] Hiding and Showing a Node with Key Press

2011-02-18 Thread Ross Lance
All, I am trying to setup a keyboard event to toggle a particular node on and off. I am not sure if I should use osg::Switch node or node masks? Any suggestions or examples you could point me to? Thanks, Ross ___ osg-users mailing list osg-users@lists.o