25 #ifndef WLINESTRIPCALLBACK_H
26 #define WLINESTRIPCALLBACK_H
31 #include <osg/Drawable>
32 #include <osg/NodeVisitor>
34 #include "core/common/WPropertyTypes.h"
35 #include "core/dataHandler/WEEG2Segment.h"
57 WPropDouble timeRange,
58 std::shared_ptr< WEEG2Segment > segment,
59 double samplingRate );
68 virtual void update( osg::NodeVisitor* , osg::Drawable* drawable );
118 std::size_t
clampToRange(
double value, std::size_t min, std::size_t max )
const;
OSG Update Callback to update the EEG graph of one channel by changing the vertex array of the line s...
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.
WLineStripCallback(std::size_t channelID, WPropDouble timePos, WPropDouble timeRange, std::shared_ptr< WEEG2Segment > segment, double samplingRate)
Constructor.
double m_currentTimeRange
the width of the graph in seconds which is currently used
double m_currentTimePos
the time position in seconds where to start the graph at the left edge which is currently used
WPropDouble m_timePos
the time position in seconds where to start the graph at the left edge as property
double m_samplingRate
sampling rate used by the recording
virtual void update(osg::NodeVisitor *, osg::Drawable *drawable)
Callback method called by the NodeVisitor.
std::shared_ptr< WEEG2Segment > m_segment
pointer to the EEG segment
const std::size_t m_channelID
the number of the channel
WPropDouble m_timeRange
the width of the graph in seconds as property