1
//---------------------------------------------------------------------------
3
// Project: OpenWalnut ( http://www.openwalnut.org )
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
8
// This file is part of OpenWalnut.
10
// OpenWalnut is free software: you can redistribute it and/or modify
11
// it under the terms of the GNU Lesser General Public License as published by
12
// the Free Software Foundation, either version 3 of the License, or
13
// (at your option) any later version.
15
// OpenWalnut is distributed in the hope that it will be useful,
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
// GNU Lesser General Public License for more details.
20
// You should have received a copy of the GNU Lesser General Public License
21
// along with OpenWalnut. If not, see <http://www.gnu.org/licenses/>.
23
//---------------------------------------------------------------------------
25
#ifndef WSCALETRANSFORMCALLBACK_H
26
#define WSCALETRANSFORMCALLBACK_H
31
#include <osg/NodeCallback>
32
#include <osg/NodeVisitor>
34
#include "core/common/WPropertyTypes.h"
38
* OSG Node Callback to update the MatrixTransform Nodes of one channel used for
41
class WScaleTransformCallback : public osg::NodeCallback
47
* \param channelID the number of the channel
48
* \param ySpacing the distance between two curves of the graph in pixel
50
* \param ySensitivity the sensitivity of the graph in microvolt per pixel
53
WScaleTransformCallback( std::size_t channelID, WPropDouble ySpacing, WPropDouble ySensitivity );
56
* Callback method called by the NodeVisitor when visiting a node.
57
* Change the matrix according to the properties.
59
* \param node The node this callback is connected to. Should be a
60
* MatrixTransform node.
61
* \param nv The node visitor which performs the traversal. Should be an
64
virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
69
* the number of the channel
71
const std::size_t m_channelID;
74
* the distance between two curves of the graph in pixel which is currently
77
double m_currentYSpacing;
80
* the sensitivity of the graph in microvolt per pixel which is currently
83
double m_currentYSensitivity;
86
* the distance between two curves of the graph in pixel as property
88
WPropDouble m_ySpacing;
91
* the sensitivity of the graph in microvolt per pixel as property
93
WPropDouble m_ySensitivity;
96
#endif // WSCALETRANSFORMCALLBACK_H