OpenWalnut
1.5.0dev
|
This callback is able to switch a osg::Switch node using a property. More...
#include <WGESwitchCallback.h>
Public Member Functions | |
WGESwitchCallback (PropType prop) | |
Creates new instance. More... | |
virtual | ~WGESwitchCallback () |
Destructor. More... | |
virtual void | operator() (osg::Node *node, osg::NodeVisitor *nv) |
This operator gets called by OSG every update cycle. More... | |
Private Attributes | |
PropType | m_prop |
The prop controlling the node switch. More... | |
This callback is able to switch a osg::Switch node using a property.
Although this callback is a template, only int and bool props are useful here. If a bool prop is used, the callback can trigger between child 0 and 1. Technically, WPropDouble is also possible.
Definition at line 36 of file WGESwitchCallback.h.
|
explicit |
Creates new instance.
prop | the property which controls switch. |
Definition at line 68 of file WGESwitchCallback.h.
|
virtual |
Destructor.
Definition at line 75 of file WGESwitchCallback.h.
|
virtual |
This operator gets called by OSG every update cycle.
node | the osg node |
nv | the node visitor |
Definition at line 81 of file WGESwitchCallback.h.
|
private |
The prop controlling the node switch.
Definition at line 64 of file WGESwitchCallback.h.