Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYAcousticRectangle.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_ACOUSTICRECTANGLE__
21 #define __TY_ACOUSTICRECTANGLE__
22 
23 class OPoint3D;
24 class OSegment3D;
25 
26 #include "TYAcousticSurface.h"
28 
37 {
41 
42  // Methodes
43 public:
55  virtual ~TYAcousticRectangle();
56 
60  bool operator==(const TYAcousticRectangle& other) const;
62  bool operator!=(const TYAcousticRectangle& other) const;
63 
77  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
78 
79  virtual std::string toString() const;
80 
81  virtual DOM_Element toXML(DOM_Element& domElement);
82  virtual int fromXML(DOM_Element domElement);
83 
84  virtual TYTabSourcePonctuelleGeoNode getSrcs() const;
85  virtual TYSourcePonctuelle srcPonctEquiv() const;
86  virtual void distriSrcs();
87  virtual bool setSrcsLw();
88 
89  virtual double surface() const;
90  virtual OVector3D normal() const;
91  virtual OPlan plan() const;
92  virtual TYTabPoint getContour(int n = -1) const;
93  virtual TYTabPoint3D getOContour(int n = -1) const;
94  virtual int intersects(const TYSurfaceInterface* pSurf, OSegment3D& seg) const;
95  virtual int intersects(const OSegment3D& seg, OPoint3D& pt) const;
96 
101  {
102  return getBoundingRect();
103  }
104 
105  virtual void inverseNormale()
106  {
108  }
109 
119  virtual void exportMesh(std::deque<OPoint3D>& points, std::deque<OTriangle>& triangles,
120  const TYGeometryNode& geonode) const
121  {
122  _pBoundingRect->exportMesh(points, triangles, geonode);
123  }
124 
125  // Membres
126 protected:
127 };
128 
134 typedef std::vector<LPTYAcousticRectangleGeoNode> TYTabAcousticRectangleGeoNode;
135 
136 #endif // __TY_ACOUSTICRECTANGLE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< LPTYAcousticRectangleGeoNode > TYTabAcousticRectangleGeoNode
Collection de noeuds geometriques de type TYAcousticRectangle.
TYGeometryNode TYAcousticRectangleGeoNode
Noeud geometrique de type TYAcousticRectangle.
SmartPtr< TYAcousticRectangleGeoNode > LPTYAcousticRectangleGeoNode
Smart Pointer sur TYAcousticRectangleGeoNode.
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
virtual TYTabPoint getContour(int n=-1) const
virtual int intersects(const TYSurfaceInterface *pSurf, OSegment3D &seg) const
bool operator==(const TYAcousticRectangle &other) const
Operateur ==.
virtual int fromXML(DOM_Element domElement)
virtual TYTabPoint3D getOContour(int n=-1) const
TYAcousticRectangle & operator=(const TYAcousticRectangle &other)
Operateur =.
virtual DOM_Element toXML(DOM_Element &domElement)
virtual std::string toString() const
bool operator!=(const TYAcousticRectangle &other) const
Operateur !=.
virtual void exportMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const TYGeometryNode &geonode) const
Export the surface as a triangular mesh.
virtual OPlan plan() const
TYRectangle * getShape()
virtual void inverseNormale()
virtual double surface() const
virtual OVector3D normal() const
virtual TYSourcePonctuelle srcPonctEquiv() const
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
LPTYRectangle _pBoundingRect
Rectangle englobant.
TYRectangle * getBoundingRect()
virtual void inverseNormale()
void exportMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const TYGeometryNode &geonode) const
Export the surface as a triangular mesh.