OpenWalnut  1.5.0dev
Public Member Functions | Public Attributes | List of all members
WMTemplate::TranslateCallback Class Reference

Node callback to change the position of the shapes in the coordinate system of the scene. More...

+ Inheritance diagram for WMTemplate::TranslateCallback:
+ Collaboration diagram for WMTemplate::TranslateCallback:

Public Member Functions

 TranslateCallback (WMTemplate *module)
 Constructor. More...
 
virtual void operator() (osg::Node *node, osg::NodeVisitor *nv)
 operator () - called during the update traversal. More...
 

Public Attributes

WMTemplatem_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...
 

Detailed Description

Node callback to change the position of the shapes in the coordinate system of the scene.

For more details on this class, refer to the documentation in moduleMain().

Definition at line 358 of file WMTemplate.h.

Constructor & Destructor Documentation

◆ TranslateCallback()

WMTemplate::TranslateCallback::TranslateCallback ( WMTemplate module)
inlineexplicit

Constructor.

Parameters
modulejust set the creating module as pointer for later reference.

Definition at line 366 of file WMTemplate.h.

Member Function Documentation

◆ operator()()

void WMTemplate::TranslateCallback::operator() ( osg::Node *  node,
osg::NodeVisitor *  nv 
)
virtual

operator () - called during the update traversal.

Parameters
nodethe osg node
nvthe node visitor

Definition at line 788 of file WMTemplate.cpp.

Member Data Documentation

◆ m_initialUpdate

bool WMTemplate::TranslateCallback::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 389 of file WMTemplate.h.

◆ m_module

WMTemplate* WMTemplate::TranslateCallback::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 383 of file WMTemplate.h.


The documentation for this class was generated from the following files: