Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYBoundaryNoiseMapGraphic.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) <2012-2024> <EDF-DTG> <FRANCE>
3  * This file is part of Code_TYMPAN (R).
4  * Code_TYMPAN (R) is free software: you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License as published by
6  * the Free Software Foundation, either version 3 of the License, or
7  * (at your option) any later version.
8  * Code_TYMPAN (R) is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
11  * See the GNU General Public License for more details.
12  * You should have received a copy of the GNU General Public License along
13  * with Code_TYMPAN (R). If not, see <https://www.gnu.org/licenses/>.
14  */
15 
27 #ifndef __TY_BOUNDARY_NOISE_MAP_GRAPHIC__
28 #define __TY_BOUNDARY_NOISE_MAP_GRAPHIC__
29 
31 #if _MSC_VER > 1000
32  #pragma once
33 #endif // _MSC_VER > 1000
34 
36 
37 #include "TYPolyLineGraphic.h"
38 
44 {
46 
47 public:
49  {
54 
59 
64 
69  virtual void update(bool force = false);
70 
76  virtual void display(TYRenderContext& renderContext);
77 
83  virtual void getChilds(TYListPtrTYElementGraphic& childs, bool recursive = true);
84 
88  virtual OBox computeBoundingBox() const;
89 
94  virtual void setRendering(int mode)
95  {
96  _Rendering = (RenderingMode)mode;
97  };
98 
99 protected:
105  virtual void displayMixed(float opacity = 1.f, bool antialiasing = true);
106 
112  virtual void displaySurface(float opacity = 1.f, bool antialiasing = true);
113 
119  virtual void displayLines(float opacity = 1.f, bool invertColors = false);
120 
125  void displayOnHighlight(TYRenderContext& renderContext);
126 
127 protected:
130 
132  std::vector<MTriangle> _mesh;
133 
135  std::vector<MPoint> _isoCurve;
136 
137  // XXX Since we never change these values, maybe we could use constants instead
138  // (they also appears in TYRectangularMaillageGraphic...)
140  double _paletteX;
141 
143  double _paletteY;
144 
146  double _paletteW;
147 
149  double _paletteH;
150 
152  double _panelW;
153 
155  double _panelH;
156 };
157 
158 #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)
Contexte de rendu utilisé par les fonctions d'affichage.
The box class.
Definition: 3d.h:1346
Rendering class for the BoundaryNoiseMap entity.
void displayOnHighlight(TYRenderContext &renderContext)
What we have to display when the entity is highlighted.
enum TYBoundaryNoiseMapGraphic::RenderingMode _Rendering
virtual void displaySurface(float opacity=1.f, bool antialiasing=true)
Display the surface of the mesh.
double _paletteX
The position of the palette in x.
virtual void setRendering(int mode)
Set the rendering mode (surface, isocurve or both).
double _paletteY
The position of the palette in y.
virtual void displayMixed(float opacity=1.f, bool antialiasing=true)
Display both the surface and the isocurve.
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 OBox computeBoundingBox() const
Compute the bounding box of the object.
TYBoundaryNoiseMapGraphic(TYBoundaryNoiseMap *pElement)
Constructor.
std::vector< MTriangle > _mesh
The mesh.
double _panelH
The height of the panel.
double _panelW
The width of the panel.
std::vector< MPoint > _isoCurve
The iso curve.
virtual ~TYBoundaryNoiseMapGraphic()
Destructor.
virtual void display(TYRenderContext &renderContext)
Display the object.
This class represents a polyline with a thickness. Acoustic receptors are sampled inside this region.
classe graphique pour un element de base