Code_TYMPAN  4.4.0
Industrial site acoustic simulation
OGLRectangleElement.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_RECTANGLE_ELEMENT
24 #define __OGL_RECTANGLE_ELEMENT
25 
26 #include "OGLElement.h"
27 #include "Tympan/core/color.h"
29 
30 #include <qstring.h>
31 
32 class OGLRectangle;
33 
38 {
39 public:
44 
48  virtual ~OGLRectangleElement();
49 
50  virtual int render();
51 
52  void setColor(const OColor& oColor);
53 
54  void setPoint0(const OPoint3D& point0)
55  {
56  m_oPoint0 = point0;
57  };
58  void setPoint1(const OPoint3D& point1)
59  {
60  m_oPoint1 = point1;
61  };
62  void setPoint2(const OPoint3D& point2)
63  {
64  m_oPoint2 = point2;
65  };
66  void setPoint3(const OPoint3D& point3)
67  {
68  m_oPoint3 = point3;
69  };
70 
71  double* getPoint0()
72  {
73  return m_oPoint0.getCoords();
74  };
75  double* getPoint1()
76  {
77  return m_oPoint1.getCoords();
78  };
79  double* getPoint2()
80  {
81  return m_oPoint2.getCoords();
82  };
83  double* getPoint3()
84  {
85  return m_oPoint3.getCoords();
86  };
87 
88  void setFull(bool bFull)
89  {
90  m_bFull = bFull;
91  };
92 
93 protected:
99  bool m_bFull;
101 };
102 
103 #endif //__OGL_RECTANGLE_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
OGLRectangle * m_pOGLRectangleToDisplay
void setFull(bool bFull)
void setColor(const OColor &oColor)
void setPoint2(const OPoint3D &point2)
void setPoint3(const OPoint3D &point3)
void setPoint0(const OPoint3D &point0)
void setPoint1(const OPoint3D &point1)
The 3D point class.
Definition: 3d.h:487