Code_TYMPAN  4.4.0
Industrial site acoustic simulation
OGLScalarBarElement.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012> <EDF-R&D> <FRANCE>
3  * This program is free software; you can redistribute it and/or modify
4  * it under the terms of the GNU General Public License as published by
5  * the Free Software Foundation; either version 2 of the License, or
6  * (at your option) any later version.
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10  * See the GNU General Public License for more details.
11  * You should have received a copy of the GNU General Public License along
12  * with this program; if not, write to the Free Software Foundation, Inc.,
13  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
14  */
15 
16 /*
17  *
18  *
19  *
20  *
21  */
22 
23 #ifndef __OGL_SCALARBAR_ELEMENT
24 #define __OGL_SCALARBAR_ELEMENT
25 
26 #include "OGLElement.h"
27 #include "Tympan/core/color.h"
29 
30 #include <qstring.h>
31 
32 class OGLRectangle;
33 class OGLFont;
34 
39 {
40 public:
45 
49  virtual ~OGLScalarBarElement();
50 
51  virtual int render();
52 
53  void setFont(const QString& qsFontPath)
54  {
55  m_qsFontPath = qsFontPath;
56  };
57  void setFontColor(const OColor& oFontColor)
58  {
59  m_oFontColor = oFontColor;
60  };
61 
62  void setPosition(const OPoint3D& position)
63  {
64  m_oPosition = position;
65  };
66  void setTexts(const std::string& text0, const std::string& text1, const std::string& text2)
67  {
68  m_stdText0 = text0;
69  m_stdText1 = text1;
70  m_stdText2 = text2;
71  };
72  void setSizes(float width, float height)
73  {
74  m_fWidth = width;
75  m_fHeight = height;
76  };
77  void initPositions();
78 
79  double* getPosition()
80  {
81  return m_oPosition.getCoords();
82  };
83 
84 protected:
86  OPoint3D m_oPosA; // A ----- B ------ C
87  OPoint3D m_oPosB; // | | |
88  OPoint3D m_oPosC; // D ----- E ------ F
92  std::string m_stdText0;
93  std::string m_stdText1;
94  std::string m_stdText2;
95  float m_fWidth;
96  float m_fHeight;
102  QString m_qsFontPath;
104 };
105 
106 #endif //__OGL_SCALARBAR_ELEMENT
All base classes related to 3D manipulation.
Definition: color.h:31
void getCoords(double coords[3])
Gets the coordinates as an array of double.
Definition: 3d.cpp:90
void setSizes(float width, float height)
void setTexts(const std::string &text0, const std::string &text1, const std::string &text2)
OGLRectangle * m_pOGLRectangleRightToDisplay
void setPosition(const OPoint3D &position)
OGLRectangle * m_pOGLRectangleLeftToDisplay
void setFontColor(const OColor &oFontColor)
void setFont(const QString &qsFontPath)
The 3D point class.
Definition: 3d.h:487