OpenCOVER
OSGVruiTextureRectBackground.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//-*-c++-*-
9
10#ifndef OSG_VRUI_TEXTURERECT_BACKGROUND_H
11#define OSG_VRUI_TEXTURERECT_BACKGROUND_H
12
14
15#include <osg/Array>
16#include <osg/Geode>
17#include <osg/Geometry>
18#include <osg/MatrixTransform>
19#include <osg/StateSet>
20//#include <osg/Texture2D>
21#include <osg/TextureRectangle>
22
24
25namespace vrui
26{
27
34 : public OSGVruiUIContainer
35{
36public:
39
40 virtual void createGeometry();
41 virtual void resizeGeometry();
42
43 virtual void update();
44
45 virtual void setEnabled(bool en);
46 virtual void setHighlighted(bool hl);
47
48protected:
50
53 void createTexturesFromArrays(uint *normalImage, int comp, int ns, int nt, int nr);
54
57
58private:
59 //shared coord and color list
60 osg::ref_ptr<osg::Vec3Array> coord;
61 osg::ref_ptr<osg::Vec2Array> texcoord;
62
63 static osg::ref_ptr<osg::Vec3Array> normal;
64
65 osg::ref_ptr<osg::StateSet> state;
66 osg::ref_ptr<osg::StateSet> highlightState;
67 osg::ref_ptr<osg::StateSet> disabledState;
68
69 osg::ref_ptr<osg::Geode> geometryNode;
70 osg::ref_ptr<osg::Geometry> geometry;
71
72 osg::ref_ptr<osg::TextureRectangle> texNormal;
73 osg::ref_ptr<osg::TextureRectangle> texHighlighted;
74 osg::ref_ptr<osg::TextureRectangle> texDisabled;
75
76 void createGeode();
77
78 bool repeat;
79 float texXSize;
80 float texYSize;
81};
82}
83#endif
unsigned int uint
abbreviation for unsigned int
Definition: rel_mcast-old.h:77
collaborative interface manager
Definition: coVRCommunication.h:41
Definition: coTextureRectBackground.h:62
Definition: coTextureRectBackground.h:70
Definition: OSGVruiTextureRectBackground.h:35
coTextureRectBackground * background
Definition: OSGVruiTextureRectBackground.h:55
void createTexturesFromArrays(uint *normalImage, int comp, int ns, int nt, int nr)
OSGVruiTextureRectBackground(coTextureRectBackground *background)
coTextureRectBackground::TextureSet * tex
Definition: OSGVruiTextureRectBackground.h:56
virtual void setEnabled(bool en)
virtual void setHighlighted(bool hl)
Definition: OSGVruiUIContainer.h:18