OpenCOVER
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
OSGVruiFrame.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_FRAME_H
9 #define OSG_VRUI_FRAME_H
10 
11 #include <util/coTypes.h>
12 
14 
15 #include <osg/Geode>
16 #include <osg/Geometry>
17 #include <osg/Texture2D>
18 #include <osg/Vec3>
19 
20 #include <string>
21 
22 #ifdef _WIN32
23 typedef unsigned short ushort;
24 #endif
25 
26 namespace vrui
27 {
28 
29 class coFrame;
30 
38 class OSGVRUIEXPORT OSGVruiFrame : public OSGVruiUIContainer
39 {
40 
41 public:
42  OSGVruiFrame(coFrame *frame, const std::string &textureName = "UI/Frame");
43  virtual ~OSGVruiFrame();
44 
45  void createGeometry();
46 
47 protected:
48  virtual void resizeGeometry();
49  void realign();
50 
52 
53 private:
54  //shared coord and color list
55  void createSharedLists();
56 
57  osg::ref_ptr<osg::Vec3Array> coord;
58 
59  static osg::ref_ptr<osg::Vec4Array> color;
60  static osg::ref_ptr<osg::Vec3Array> normal;
61  static osg::ref_ptr<osg::Vec2Array> texCoord;
62  static osg::ref_ptr<osg::DrawElementsUShort> coordIndex;
63 
64  osg::ref_ptr<osg::Texture2D> texture;
65 
66  osg::ref_ptr<osg::Geode> geometryNode;
67  osg::ref_ptr<osg::Geometry> geometry;
68  osg::ref_ptr<osg::StateSet> stateSet;
69 };
70 }
71 #endif
Definition: OSGVruiFrame.h:38
Definition: OSGVruiUIContainer.h:17
Definition: coFrame.h:28
coFrame * frame
Definition: OSGVruiFrame.h:51
unsigned short ushort
abbreviation for unsigned short
Definition: rel_mcast-old.h:76