Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYBoundaryNoiseMapGraphic.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 
27 #ifndef __TY_BOUNDARY_NOISE_MAP_GRAPHIC__
28 #define __TY_BOUNDARY_NOISE_MAP_GRAPHIC__
29 
30 #if _MSC_VER > 1000
31  #pragma once
32 #endif // _MSC_VER > 1000
33 
35 
37 
38 #include "TYPolyLineGraphic.h"
39 
45 {
47 
48 public:
50  {
55 
60 
65 
70  virtual void update(bool force = false);
71 
77  virtual void display(TYElement* pModelerElement = nullptr, GLenum mode = GL_RENDER);
78 
84  virtual void getChilds(TYListPtrTYElementGraphic& childs, bool recursive = true);
85 
89  virtual void computeBoundingBox();
90 
95  virtual void setRendering(int mode)
96  {
97  _Rendering = (RenderingMode)mode;
98  };
99 
100 protected:
105  virtual void displayMixed(float opacity = 1.f);
106 
111  virtual void displaySurface(float opacity = 1.f);
112 
118  virtual void displayLines(float opacity = 1.f, bool invertColors = false);
119 
124  void displayOnHighlight(int mode);
125 
126 protected:
129 
131  std::vector<MTriangle> _mesh;
132 
134  std::vector<MPoint> _isoCurve;
135 
136  // XXX Since we never change these values, maybe we could use constants instead
137  // (they also appears in TYRectangularMaillageGraphic...)
139  double _paletteX;
140 
142  double _paletteY;
143 
145  double _paletteW;
146 
148  double _paletteH;
149 
151  double _panelW;
152 
154  double _panelH;
155 };
156 
157 #endif // __TY_BOUNDARY_NOISE_MAP_GRAPHIC__
list< TYElementGraphic * > TYListPtrTYElementGraphic
List de pointeur de TYElement.
#define TY_DECL_METIER_GRAPHIC(classname)
Representation graphique d'une polyligne (fichier header)
Rendering class for the BoundaryNoiseMap entity.
enum TYBoundaryNoiseMapGraphic::RenderingMode _Rendering
double _paletteX
The position of the palette in x.
virtual void setRendering(int mode)
Set the rendering mode (surface, isocurve or both).
virtual void displaySurface(float opacity=1.f)
Display the surface of the mesh.
double _paletteY
The position of the palette in y.
double _paletteW
The width of the palette.
virtual void displayLines(float opacity=1.f, bool invertColors=false)
Display the isocurve.
LPTYPolyLineGraphic _pPolyLineGraphic
The polyline rendering.
double _paletteH
The height of the palette.
virtual void getChilds(TYListPtrTYElementGraphic &childs, bool recursive=true)
Set the children.
virtual void update(bool force=false)
Update the mesh and the isocurve.
virtual void displayMixed(float opacity=1.f)
Display both the surface and the isocurve.
TYBoundaryNoiseMapGraphic(TYBoundaryNoiseMap *pElement)
Constructor.
virtual void display(TYElement *pModelerElement=nullptr, GLenum mode=GL_RENDER)
Display the object.
std::vector< MTriangle > _mesh
The mesh.
double _panelH
The height of the panel.
double _panelW
The width of the panel.
void displayOnHighlight(int mode)
What we have to display when the entity is highlighted.
std::vector< MPoint > _isoCurve
The iso curve.
virtual ~TYBoundaryNoiseMapGraphic()
Destructor.
virtual void computeBoundingBox()
Compute the bounding box of the object.
This class represents a polyline with a thickness. Acoustic receptors are sampled inside this region.
classe graphique pour un element de base