Code_TYMPAN  4.4.0
Industrial site acoustic simulation
OGLGridElement.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_GRID_ELEMENT
24 #define __OGL_GRID_ELEMENT
25 
26 #include "OGLElement.h"
27 #include "Tympan/core/color.h"
28 
29 #include <qstring.h>
30 
31 class OGLGrid;
32 
36 class OGLGridElement : public OGLElement
37 {
38 public:
43 
47  virtual ~OGLGridElement();
48 
49  virtual int render();
50 
51  void setColor(const OColor& oColor);
52 
53  void setGridDimX(const float gridDimX)
54  {
55  m_fGridDimX = gridDimX;
56  };
57  void setGridDimY(const float gridDimY)
58  {
59  m_fGridDimY = gridDimY;
60  };
61  void setGridStep(const float gridStep)
62  {
63  m_fGridStep = gridStep;
64  };
65 
66  void setShowGridXY(bool bShow)
67  {
68  m_bShowGridXY = bShow;
69  };
70  void setShowGridXZ(bool bShow)
71  {
72  m_bShowGridXZ = bShow;
73  };
74  void setShowGridZY(bool bShow)
75  {
76  m_bShowGridZY = bShow;
77  };
78 
80  {
81  return m_bShowGridXY;
82  };
84  {
85  return m_bShowGridXZ;
86  };
88  {
89  return m_bShowGridZY;
90  };
91 
92  float getGridDimX()
93  {
94  return m_fGridDimX;
95  };
96  float getGridDimY()
97  {
98  return m_fGridDimY;
99  };
100  float getGridStep()
101  {
102  return m_fGridStep;
103  };
104 
105 protected:
107  float m_fGridDimX;
108  float m_fGridDimY;
109  float m_fGridStep;
114 };
115 
116 #endif //__OGL_GRID_ELEMENT
Definition: color.h:31
bool getShowGridXZ()
bool getShowGridZY()
virtual ~OGLGridElement()
void setShowGridXZ(bool bShow)
float getGridDimX()
void setGridDimX(const float gridDimX)
void setShowGridXY(bool bShow)
bool getShowGridXY()
void setGridDimY(const float gridDimY)
float getGridDimY()
virtual int render()
void setColor(const OColor &oColor)
void setShowGridZY(bool bShow)
OGLGrid * m_pOGLGridToDisplay
void setGridStep(const float gridStep)