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
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
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
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
4 matches
Mail list logo