OpenWalnut  1.4.0
Public Member Functions | Private Attributes
WGESwitchCallback< PropType > Class Template Reference

This callback is able to switch a osg::Switch node using a property. More...

#include <WGESwitchCallback.h>

+ Inheritance diagram for WGESwitchCallback< PropType >:

List of all members.

Public Member Functions

 WGESwitchCallback (PropType prop)
 Creates new instance.
virtual ~WGESwitchCallback ()
 Destructor.
virtual void operator() (osg::Node *node, osg::NodeVisitor *nv)
 This operator gets called by OSG every update cycle.

Private Attributes

PropType m_prop
 The prop controlling the node switch.

Detailed Description

template<typename PropType>
class WGESwitchCallback< PropType >

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.


Constructor & Destructor Documentation

template<typename PropType >
WGESwitchCallback< PropType >::WGESwitchCallback ( PropType  prop) [explicit]

Creates new instance.

Parameters:
propthe property which controls switch.

Definition at line 68 of file WGESwitchCallback.h.

template<typename PropType >
WGESwitchCallback< PropType >::~WGESwitchCallback ( ) [virtual]

Destructor.

Definition at line 75 of file WGESwitchCallback.h.


Member Function Documentation

template<typename PropType >
void WGESwitchCallback< PropType >::operator() ( osg::Node *  node,
osg::NodeVisitor *  nv 
) [virtual]

This operator gets called by OSG every update cycle.

Parameters:
nodethe osg node
nvthe node visitor

Definition at line 81 of file WGESwitchCallback.h.


Member Data Documentation

template<typename PropType >
PropType WGESwitchCallback< PropType >::m_prop [private]

The prop controlling the node switch.

Definition at line 64 of file WGESwitchCallback.h.


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