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 WLABELSTRANSFORMCALLBACK_H
26
#define WLABELSTRANSFORMCALLBACK_H
29
#include <osg/NodeCallback>
30
#include <osg/NodeVisitor>
32
#include "core/common/WPropertyTypes.h"
36
* OSG Node Callback to update the MatrixTransform Node of the labels used for
37
* panning and zooming.
39
class WLabelsTransformCallback : public osg::NodeCallback
45
* \param yPos the y position in pixel at the lower edge as property
46
* \param ySpacing the distance between two curves of the graph in pixel as
49
WLabelsTransformCallback( WPropDouble yPos, WPropDouble ySpacing );
52
* Callback method called by the NodeVisitor when visiting a node.
53
* Change the matrix according to the properties.
55
* \param node The node this callback is connected to. Should be a
56
* MatrixTransform node.
57
* \param nv The node visitor which performs the traversal. Should be an
60
virtual void operator()( osg::Node* node, osg::NodeVisitor* nv );
65
* the y position in pixel at the lower edge which is currently used
70
* the distance between two curves of the graph in pixel which is currently
73
double m_currentYSpacing;
76
* the y position in pixel at the lower edge as property
81
* the distance between two curves of the graph in pixel as property
83
WPropDouble m_ySpacing;
86
#endif // WLABELSTRANSFORMCALLBACK_H