OMToolkit  1.0
The polygonal mesh processing tool.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
OMLegendGeo.h
Go to the documentation of this file.
1 //==============================================================================
14 #ifndef _OM_LEGENDGEO_H_
15 #define _OM_LEGENDGEO_H_
16 
17 #include <osg/MatrixTransform>
18 #include <osg/Projection>
19 
20 #include <osg/Matrix>
21 #include <osg/Geode>
22 #include <osg/Geometry>
23 #include <osgText/Text>
24 #include <OMToolkit/OMVisualiser.h>
25 
26 #include <OpenMesh\Tools\Utils\Timer.hh>
27 #include <OMToolkit\OMErrorLog.h>
28 #include <MDSTk\Base\mdsGlobalLog.h>
29 #include <OpenMesh\Core\IO\exporter\ExporterT.hh>
30 #include <OMToolkit\OMTypes.h>
31 
32 #include <osg/Geometry>
33 
34 namespace osg
35 {
39  const int HUD_SIZE = 200;
40 
44  const int HUD_MARGIN = 20;
45 
49  const int HUD_HEIGHT = 20;
50 
54  const int TEXT_SIZE = 3;
55 
59  const int TEXT_CHAR = 9;
60 
64  class OMLegendGeometry : public Geometry
65  {
66  public:
74  OMLegendGeometry(double min, double max, int windowHeight, int windowWidth);
75 
80  void addToGroup(osg::ref_ptr<osg::Group> parent);
81 
82  private:
86  int m_width;
87 
91  int m_height;
92 
96  ref_ptr<osgText::Text> text[TEXT_SIZE];
97  }; // class OMLegendGeo
98 } // namespace osg
99 #endif