OpenWalnut
1.5.0dev
|
OSG Update Callback to update the EEG graph of one channel by changing the vertex array of the line strip. More...
#include <WLineStripCallback.h>
Public Member Functions | |
WLineStripCallback (std::size_t channelID, WPropDouble timePos, WPropDouble timeRange, std::shared_ptr< WEEG2Segment > segment, double samplingRate) | |
Constructor. More... | |
virtual void | update (osg::NodeVisitor *, osg::Drawable *drawable) |
Callback method called by the NodeVisitor. More... | |
Private Member Functions | |
std::size_t | clampToRange (double value, std::size_t min, std::size_t max) const |
Convert the given double value to std::size_t and clamp it into the given range. More... | |
Private Attributes | |
const std::size_t | m_channelID |
the number of the channel More... | |
double | m_currentTimePos |
the time position in seconds where to start the graph at the left edge which is currently used More... | |
double | m_currentTimeRange |
the width of the graph in seconds which is currently used More... | |
WPropDouble | m_timePos |
the time position in seconds where to start the graph at the left edge as property More... | |
WPropDouble | m_timeRange |
the width of the graph in seconds as property More... | |
std::shared_ptr< WEEG2Segment > | m_segment |
pointer to the EEG segment More... | |
double | m_samplingRate |
sampling rate used by the recording More... | |
OSG Update Callback to update the EEG graph of one channel by changing the vertex array of the line strip.
Definition at line 42 of file WLineStripCallback.h.
WLineStripCallback::WLineStripCallback | ( | std::size_t | channelID, |
WPropDouble | timePos, | ||
WPropDouble | timeRange, | ||
std::shared_ptr< WEEG2Segment > | segment, | ||
double | samplingRate | ||
) |
Constructor.
channelID | the number of the channel |
timePos | the time position in seconds where to start the graph at the left edge as property |
timeRange | the width of the graph in seconds as property |
segment | pointer to the EEG segment |
samplingRate | sampling rate used by the recording |
Definition at line 43 of file WLineStripCallback.cpp.
|
private |
Convert the given double value to std::size_t and clamp it into the given range.
value | value to convert |
min | minimum of the valid range |
max | maximum of the valid range |
Definition at line 131 of file WLineStripCallback.cpp.
Referenced by update().
|
virtual |
Callback method called by the NodeVisitor.
Changes the vertex array of the line strip according to the properties.
drawable | The drawable this callback is connected to. Should be a Geometry. |
Definition at line 58 of file WLineStripCallback.cpp.
References clampToRange(), m_channelID, m_currentTimePos, m_currentTimeRange, m_samplingRate, m_segment, m_timePos, and m_timeRange.
|
private |
the number of the channel
Definition at line 75 of file WLineStripCallback.h.
Referenced by update().
|
private |
the time position in seconds where to start the graph at the left edge which is currently used
Definition at line 81 of file WLineStripCallback.h.
Referenced by update().
|
private |
the width of the graph in seconds which is currently used
Definition at line 86 of file WLineStripCallback.h.
Referenced by update().
|
private |
sampling rate used by the recording
Definition at line 107 of file WLineStripCallback.h.
Referenced by update().
|
private |
pointer to the EEG segment
Definition at line 102 of file WLineStripCallback.h.
Referenced by update().
|
private |
the time position in seconds where to start the graph at the left edge as property
Definition at line 92 of file WLineStripCallback.h.
Referenced by update().
|
private |
the width of the graph in seconds as property
Definition at line 97 of file WLineStripCallback.h.
Referenced by update().