osgEarth 2.1.1
Public Member Functions | Public Attributes

ToggleNodeHandler Struct Reference

Inheritance diagram for ToggleNodeHandler:
Collaboration diagram for ToggleNodeHandler:

List of all members.

Public Member Functions

 ToggleNodeHandler (osg::Node *node)
virtual void onValueChanged (class Control *control, bool value)

Public Attributes

osg::observer_ptr< osg::Node > _node

Detailed Description

Definition at line 73 of file osgearth_viewer.cpp.


Constructor & Destructor Documentation

ToggleNodeHandler::ToggleNodeHandler ( osg::Node *  node) [inline]

Definition at line 75 of file osgearth_viewer.cpp.

: _node(node) { }

Member Function Documentation

virtual void ToggleNodeHandler::onValueChanged ( class Control control,
bool  value 
) [inline, virtual]

Value events

Reimplemented from osgEarth::Util::Controls::ControlEventHandler.

Definition at line 77 of file osgearth_viewer.cpp.

    {
        osg::ref_ptr<osg::Node> safeNode = _node.get();
        if ( safeNode.valid() )
            safeNode->setNodeMask( value ? ~0 : 0 );
    }

Member Data Documentation

osg::observer_ptr<osg::Node> ToggleNodeHandler::_node

Definition at line 84 of file osgearth_viewer.cpp.


The documentation for this struct was generated from the following file:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines