OpenWalnut
1.5.0dev
|
OSG Update Callback to change the color of a head surface by changing its 1D texture coordinates when an event position changed. More...
#include <WHeadSurfaceCallback.h>
Public Member Functions | |
WHeadSurfaceCallback (const std::vector< std::size_t > &channelIDs, WPropDouble colorSensitivity, std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > event) | |
Constructor. More... | |
virtual void | update (osg::NodeVisitor *, osg::Drawable *drawable) |
Callback method called by the NodeVisitor. More... | |
Private Attributes | |
double | m_currentColorSensitivity |
the sensitivity of the color map which is currently used More... | |
double | m_currentTime |
The time position which is currently used. More... | |
const std::vector< std::size_t > | m_channelIDs |
the mapping from vertex indices to channel IDs More... | |
WPropDouble | m_colorSensitivity |
The sensitivity of the color map as property. More... | |
std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > | m_event |
event marking a special time position as WFlag More... | |
OSG Update Callback to change the color of a head surface by changing its 1D texture coordinates when an event position changed.
Definition at line 44 of file WHeadSurfaceCallback.h.
WHeadSurfaceCallback::WHeadSurfaceCallback | ( | const std::vector< std::size_t > & | channelIDs, |
WPropDouble | colorSensitivity, | ||
std::shared_ptr< WFlag< std::shared_ptr< WEEGEvent > > > | event | ||
) |
Constructor.
channelIDs | the mapping from vertex indices to channel IDs |
colorSensitivity | The sensitivity of the color map as property. The color map ranges from -colorSensitivity to +colorSensitivity in microvolt. |
event | event marking a special time position as WFlag |
Definition at line 39 of file WHeadSurfaceCallback.cpp.
|
virtual |
Callback method called by the NodeVisitor.
Changes the color of the head surface according to the event.
drawable | The drawable this callback is connected to. Should be a Geometry with a 1D texture. |
Definition at line 50 of file WHeadSurfaceCallback.cpp.
References m_channelIDs, m_colorSensitivity, m_currentColorSensitivity, m_currentTime, and m_event.
|
private |
the mapping from vertex indices to channel IDs
Definition at line 86 of file WHeadSurfaceCallback.h.
Referenced by update().
|
private |
The sensitivity of the color map as property.
The color map ranges from -m_colorSensitivity to +m_colorSensitivity in microvolt.
Definition at line 92 of file WHeadSurfaceCallback.h.
Referenced by update().
|
private |
the sensitivity of the color map which is currently used
Definition at line 74 of file WHeadSurfaceCallback.h.
Referenced by update().
|
private |
The time position which is currently used.
The color is updated if the new time from the m_event is different to this.
Definition at line 81 of file WHeadSurfaceCallback.h.
Referenced by update().
event marking a special time position as WFlag
Definition at line 97 of file WHeadSurfaceCallback.h.
Referenced by update().