Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticPolygon.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 
16 /*
17  *
18  */
19 
20 #ifndef __TY_ACOUSTIC_POLYGON__
21 #define __TY_ACOUSTIC_POLYGON__
22 
24 #include "TYAcousticSurface.h"
25 
31 {
35 
36  // Methodes
37 public:
49  virtual ~TYAcousticPolygon();
50 
54  bool operator==(const TYAcousticPolygon& other) const;
56  bool operator!=(const TYAcousticPolygon& other) const;
57 
71  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
72 
73  virtual std::string toString() const;
74 
75  virtual DOM_Element toXML(DOM_Element& domElement);
76  virtual int fromXML(DOM_Element domElement);
77 
78  virtual TYTabSourcePonctuelleGeoNode getSrcs() const;
79  virtual TYSourcePonctuelle srcPonctEquiv() const;
80  virtual void distriSrcs();
81  virtual bool setSrcsLw();
82 
83  virtual double surface() const;
84  virtual OVector3D normal() const;
85  virtual OPlan plan() const;
86  virtual TYTabPoint getContour(int n = -1) const;
87  virtual TYTabPoint3D getOContour(int n = -1) const;
88  virtual int intersects(const TYSurfaceInterface* pSurf, OSegment3D& seg) const;
89  virtual int intersects(const OSegment3D& seg, OPoint3D& pt) const;
90  virtual int intersects(const OPoint3D& pt) const;
91 
96  {
97  return _pPolygon;
98  }
102  const LPTYPolygon getPolygon() const
103  {
104  return _pPolygon;
105  }
106 
107  virtual void inverseNormale()
108  {
110  }
111 
121  virtual void exportMesh(std::deque<OPoint3D>& points, std::deque<OTriangle>& triangles,
122  const TYGeometryNode& geonode) const
123  {
124  return _pPolygon->exportMesh(points, triangles, geonode);
125  }
126 
127  double getVerticalExtensionInRefCoordSystem(const TYGeometryNode& refCoordSystem) const override
128  {
129  return _pPolygon->getVerticalExtensionInRefCoordSystem(refCoordSystem);
130  }
131 
132  double getHorizontalExtensionInRefCoordSystem(const TYGeometryNode& refCoordSystem) const override
133  {
134  return _pPolygon->getHorizontalExtensionInRefCoordSystem(refCoordSystem);
135  }
136 
137  // Membres
138 protected:
141 };
142 
144 
145 #endif // __TY_ACOUSTIC_POLYGON__
QDomElement DOM_Element
Definition: QT2DOM.h:30
SmartPtr< TYAcousticPolygon > LPTYAcousticPolygon
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::deque< OPoint3D > TYTabPoint3D
Collection de OPoint3D.
Definition: TYDefines.h:403
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:430
#define OPROTODECL(classname)
Definition: TYElement.h:64
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:385
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
Plan defined by its equation : ax+by+cz+d=0.
Definition: plan.h:31
The 3D point class.
Definition: 3d.h:487
Class to define a segment.
Definition: 3d.h:1141
The 3D vector class.
Definition: 3d.h:298
bool operator!=(const TYAcousticPolygon &other) const
Operateur !=.
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
virtual bool setSrcsLw()
virtual void exportMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const TYGeometryNode &geonode) const
Export the surface as a triangular mesh.
TYAcousticPolygon & operator=(const TYAcousticPolygon &other)
Operateur =.
virtual int intersects(const TYSurfaceInterface *pSurf, OSegment3D &seg) const
const LPTYPolygon getPolygon() const
LPTYPolygon _pPolygon
Le polygone definissant la geometrie de cet acoustic polygon.
virtual void distriSrcs()
bool operator==(const TYAcousticPolygon &other) const
Operateur ==.
virtual TYTabPoint getContour(int n=-1) const
virtual OPlan plan() const
double getVerticalExtensionInRefCoordSystem(const TYGeometryNode &refCoordSystem) const override
Compute the vertical extension of the surface in a given reference coordinate system....
virtual void inverseNormale()
virtual std::string toString() const
virtual int fromXML(DOM_Element domElement)
virtual TYTabPoint3D getOContour(int n=-1) const
virtual double surface() const
virtual DOM_Element toXML(DOM_Element &domElement)
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
double getHorizontalExtensionInRefCoordSystem(const TYGeometryNode &refCoordSystem) const override
Compute the horizontal extension of the surface in a given reference coordinate system....
virtual TYSourcePonctuelle srcPonctEquiv() const
virtual LPTYPolygon getPolygon()
virtual OVector3D normal() const
void exportMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const TYGeometryNode &geonode) const
Export the surface as a triangular mesh.
Definition: TYPolygon.cpp:741
virtual void inverseNormale()
Definition: TYPolygon.cpp:727
double getVerticalExtensionInRefCoordSystem(const TYGeometryNode &refCoordSystem) const override
Compute the vertical extension of the surface in a given reference coordinate system....
Definition: TYPolygon.cpp:753
double getHorizontalExtensionInRefCoordSystem(const TYGeometryNode &refCoordSystem) const override
Compute the horizontal extension of the surface in a given reference coordinate system....
Definition: TYPolygon.cpp:765