OpenWalnut
1.5.0dev
|
Node callback to change the color of the shapes inside the root node. More...
Public Member Functions | |
SafeUpdateCallback (WMTemplate *module) | |
Constructor. More... | |
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
operator () - called during the update traversal. More... | |
Public Attributes | |
WMTemplate * | m_module |
Pointer used to access members of the module to modify the node. More... | |
bool | m_initialUpdate |
Denotes whether the update callback is called the first time. More... | |
Node callback to change the color of the shapes inside the root node.
For more details on this class, refer to the documentation in moduleMain().
Definition at line 319 of file WMTemplate.h.
|
inlineexplicit |
Constructor.
module | just set the creating module as pointer for later reference. |
Definition at line 327 of file WMTemplate.h.
|
virtual |
operator () - called during the update traversal.
node | the osg node |
nv | the node visitor |
Definition at line 773 of file WMTemplate.cpp.
References WMTemplate::m_aColor, m_initialUpdate, and m_module.
bool WMTemplate::SafeUpdateCallback::m_initialUpdate |
Denotes whether the update callback is called the first time.
It is especially useful to set some initial value even if the property has not yet changed.
Definition at line 350 of file WMTemplate.h.
Referenced by operator()().
WMTemplate* WMTemplate::SafeUpdateCallback::m_module |
Pointer used to access members of the module to modify the node.
Please do not use shared_ptr here as this would prevent deletion of the module as the callback contains a reference to it. It is safe to use a simple pointer here as callback get deleted before the module.
Definition at line 344 of file WMTemplate.h.
Referenced by operator()().