Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticPolygon.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 #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  // Membres
128 protected:
131 };
132 
134 
135 #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:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
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:1089
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
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)
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