OpenWalnut
1.5.0dev
src
modules
eegView
WLabelsTransformCallback.h
1
//---------------------------------------------------------------------------
2
//
3
// Project: OpenWalnut ( http://www.openwalnut.org )
4
//
5
// Copyright 2009 OpenWalnut Community, BSV@Uni-Leipzig and CNCF@MPI-CBS
6
// For more information see http://www.openwalnut.org/copying
7
//
8
// This file is part of OpenWalnut.
9
//
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.
14
//
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.
19
//
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/>.
22
//
23
//---------------------------------------------------------------------------
24
25
#ifndef WLABELSTRANSFORMCALLBACK_H
26
#define WLABELSTRANSFORMCALLBACK_H
27
28
#include <osg/Node>
29
#include <osg/NodeCallback>
30
#include <osg/NodeVisitor>
31
32
#include "core/common/WPropertyTypes.h"
33
34
35
/**
36
* OSG Node Callback to update the MatrixTransform Node of the labels used for
37
* panning and zooming.
38
*/
39
class
WLabelsTransformCallback
:
public
osg::NodeCallback
40
{
41
public
:
42
/**
43
* Constructor
44
*
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
47
* property
48
*/
49
WLabelsTransformCallback
( WPropDouble yPos, WPropDouble ySpacing );
50
51
/**
52
* Callback method called by the NodeVisitor when visiting a node.
53
* Change the matrix according to the properties.
54
*
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
58
* update visitor.
59
*/
60
virtual
void
operator()
( osg::Node* node, osg::NodeVisitor* nv );
61
62
protected
:
63
private
:
64
/**
65
* the y position in pixel at the lower edge which is currently used
66
*/
67
double
m_currentYPos
;
68
69
/**
70
* the distance between two curves of the graph in pixel which is currently
71
* used
72
*/
73
double
m_currentYSpacing
;
74
75
/**
76
* the y position in pixel at the lower edge as property
77
*/
78
WPropDouble
m_yPos
;
79
80
/**
81
* the distance between two curves of the graph in pixel as property
82
*/
83
WPropDouble
m_ySpacing
;
84
};
85
86
#endif
// WLABELSTRANSFORMCALLBACK_H
WLabelsTransformCallback
OSG Node Callback to update the MatrixTransform Node of the labels used for panning and zooming.
Definition:
WLabelsTransformCallback.h:40
WLabelsTransformCallback::m_currentYPos
double m_currentYPos
the y position in pixel at the lower edge which is currently used
Definition:
WLabelsTransformCallback.h:67
WLabelsTransformCallback::m_currentYSpacing
double m_currentYSpacing
the distance between two curves of the graph in pixel which is currently used
Definition:
WLabelsTransformCallback.h:73
WLabelsTransformCallback::m_yPos
WPropDouble m_yPos
the y position in pixel at the lower edge as property
Definition:
WLabelsTransformCallback.h:78
WLabelsTransformCallback::m_ySpacing
WPropDouble m_ySpacing
the distance between two curves of the graph in pixel as property
Definition:
WLabelsTransformCallback.h:83
WLabelsTransformCallback::WLabelsTransformCallback
WLabelsTransformCallback(WPropDouble yPos, WPropDouble ySpacing)
Constructor.
Definition:
WLabelsTransformCallback.cpp:35
WLabelsTransformCallback::operator()
virtual void operator()(osg::Node *node, osg::NodeVisitor *nv)
Callback method called by the NodeVisitor when visiting a node.
Definition:
WLabelsTransformCallback.cpp:43
Generated by
1.9.1