25 #ifndef WGENODEMASKCALLBACK_H
26 #define WGENODEMASKCALLBACK_H
30 #include <boost/signals2.hpp>
34 #include "core/common/WFlag.h"
35 #include "core/kernel/WKernel.h"
65 virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
This callback is useful to en-/disable nodes using the node mask based on properties.
virtual ~WGENodeMaskCallback()
Destructor.
boost::signals2::connection m_connection
The subscription to the change signal of m_flag.
ReactivateSignal m_reactivateSignal
The reactivation signal.
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
This operator gets called by OSG every update cycle.
WGENodeMaskCallback(std::shared_ptr< WBoolFlag > flag)
Creates new instance.
virtual void activate()
Gets called if m_flag changes.
boost::signals2::signal< void() > ReactivateSignal
The type of signal used to reactivate the signal.
std::shared_ptr< WBoolFlag > m_flag
The flag controlling the node mask.
boost::signals2::connection m_reactivateConnection
This connection gets established during the deactivation in operator() to ensure re-activation.