OpenCOVER
OSGVruiSlider.h
Go to the documentation of this file.
1/* This file is part of COVISE.
2
3 You can use it under the terms of the GNU Lesser General Public License
4 version 2.1 or later, see lgpl-2.1.txt.
5
6 * License: LGPL 2+ */
7
8#ifndef OSG_VRUI_SLIDER_H
9#define OSG_VRUI_SLIDER_H
10
12
13#include <osg/Array>
14#include <osg/Geode>
15#include <osg/Geometry>
16#include <osg/MatrixTransform>
17#include <osgText/Text>
18#include <osg/Switch>
19
20namespace vrui
21{
22
23class coSlider;
24class OSGVruiTransformNode;
25
29class OSGVRUIEXPORT OSGVruiSlider : public OSGVruiUIElement
30{
31public:
33 virtual ~OSGVruiSlider();
34
37
38 void update();
39
40protected:
42 osg::ref_ptr<osg::MatrixTransform> sliderTransform;
43
44 osg::ref_ptr<osg::Vec3Array> coord1;
45 osg::ref_ptr<osg::Vec3Array> coord2;
46 osg::ref_ptr<osg::Vec3Array> normal;
47 osg::ref_ptr<osg::Vec2Array> texCoord1;
48 osg::ref_ptr<osg::Vec2Array> texCoord2;
49 osg::ref_ptr<osg::Geode> positionNode;
50 osg::ref_ptr<osg::Geode> dialNode;
51 osg::ref_ptr<osg::Geode> textNode;
52 osg::ref_ptr<osg::Geode> positionNodeDisabled;
53 osg::ref_ptr<osg::Geode> dialNodeDisabled;
54
55 osg::ref_ptr<osg::Switch> switchPosition;
56 osg::ref_ptr<osg::Switch> switchDial;
57 osg::ref_ptr<osgText::Text> numberText;
58
60 void updateDial();
61
63
64private:
65 osg::ref_ptr<osg::Geode> createSlider(const std::string &textureName);
66 osg::ref_ptr<osg::Geode> createDial(const std::string &textureName);
67 osg::ref_ptr<osg::Geode> createText(float xPos = 0.0f);
68
69 float sliderDialSize;
70};
71}
72#endif
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coSlider.h:38
Definition: OSGVruiSlider.h:30
osg::ref_ptr< osg::Geode > positionNodeDisabled
disabled position indicator geode
Definition: OSGVruiSlider.h:52
OSGVruiSlider(coSlider *slider)
osg::ref_ptr< osg::Vec2Array > texCoord2
texture coordinates of dial
Definition: OSGVruiSlider.h:48
osg::ref_ptr< osg::Vec3Array > coord2
dial coordinates
Definition: OSGVruiSlider.h:45
coSlider * slider
Definition: OSGVruiSlider.h:62
osg::ref_ptr< osg::Geode > positionNode
position indicator geode
Definition: OSGVruiSlider.h:49
virtual ~OSGVruiSlider()
osg::ref_ptr< osg::MatrixTransform > sliderTransform
< DCS of slider position indicator
Definition: OSGVruiSlider.h:42
osg::ref_ptr< osg::Switch > switchPosition
Definition: OSGVruiSlider.h:55
osg::ref_ptr< osg::Vec3Array > coord1
position indicator coordinates
Definition: OSGVruiSlider.h:44
osg::ref_ptr< osg::Vec2Array > texCoord1
texture coordinates of slider position indicator
Definition: OSGVruiSlider.h:47
osg::ref_ptr< osg::Geode > textNode
Definition: OSGVruiSlider.h:51
osg::ref_ptr< osgText::Text > numberText
OSG string for slider value.
Definition: OSGVruiSlider.h:57
osg::ref_ptr< osg::Geode > dialNode
dial geode
Definition: OSGVruiSlider.h:50
osg::ref_ptr< osg::Vec3Array > normal
slider textures normal
Definition: OSGVruiSlider.h:46
osg::ref_ptr< osg::Switch > switchDial
Definition: OSGVruiSlider.h:56
osg::ref_ptr< osg::Geode > dialNodeDisabled
disabled dial geode
Definition: OSGVruiSlider.h:53
Definition: OSGVruiUIElement.h:21