Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYMachine.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  *
21  */
22 
23 #ifndef __TY_MACHINE__
24 #define __TY_MACHINE__
25 
27 #include "TYMurElement.h"
28 
33 {
37 
38  // Methodes
39 public:
43  TYMachine();
47  TYMachine(const TYMachine& other);
51  virtual ~TYMachine();
52 
54  TYMachine& operator=(const TYMachine& other);
56  bool operator==(const TYMachine& other) const;
58  bool operator!=(const TYMachine& other) const;
59 
68  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
69 
70  virtual std::string toString() const;
71 
72  virtual DOM_Element toXML(DOM_Element& domElement);
73  virtual int fromXML(DOM_Element domElement);
74 
75  virtual TYTabSourcePonctuelleGeoNode getSrcs() const;
76  virtual TYSourcePonctuelle srcPonctEquiv() const;
77  virtual bool updateAcoustic(const bool& force = false);
78  virtual void distriSrcs();
79  virtual bool setSrcsLw();
80 
81  virtual double volume() const;
82  virtual double surface() const;
83  virtual TYTabVector normals() const;
84  virtual TYTabPoint sommets() const;
85  virtual TYTabLPPolygon faces() const;
86  virtual TYBox volEnglob() const;
87  virtual TYPoint centreGravite() const;
88  virtual int intersects(const OSegment3D& seg, TYTabPoint& ptList) const;
89  virtual int isInside(const TYPoint& pt) const;
90 
94  int getCategorie() const
95  {
96  return _categorie;
97  }
101  void setCategorie(int cate)
102  {
103  _categorie = cate;
104  }
105 
109  QString getConstructeur() const
110  {
111  return _constructeur;
112  }
116  void setConstructeur(QString name)
117  {
119  }
120 
124  QString getModele() const
125  {
126  return _modele;
127  }
131  void setModele(QString name)
132  {
133  _modele = name;
134  }
135 
139  QString getCommentaire() const
140  {
141  return _commentaire;
142  }
146  void setCommentaire(QString name)
147  {
148  _commentaire = name;
149  }
150 
151  // Membres
152 protected:
156  QString _constructeur;
158  QString _modele;
160  QString _commentaire;
161 };
162 
168 typedef std::vector<LPTYMachineGeoNode> TYTabMachineGeoNode;
169 
170 #endif // __TY_MACHINE__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::vector< OVector3D > TYTabVector
Collection de OVector3D.
Definition: TYDefines.h:398
std::vector< LPTYPolygon > TYTabLPPolygon
Collection de pointeurs de TYPolygon.
Definition: TYDefines.h:349
#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
TYGeometryNode TYMachineGeoNode
Noeud geometrique de type TYMachine.
Definition: TYMachine.h:164
std::vector< LPTYMachineGeoNode > TYTabMachineGeoNode
Collection de noeuds geometriques de type TYMachine.
Definition: TYMachine.h:168
SmartPtr< TYMachineGeoNode > LPTYMachineGeoNode
Smart Pointer sur TYMachineGeoNode.
Definition: TYMachine.h:166
const char * name
std::vector< LPTYSourcePonctuelleGeoNode > TYTabSourcePonctuelleGeoNode
Collection de noeuds geometriques de type TYSourcePonctuelle.
Class to define a segment.
Definition: 3d.h:1089
Definition: TYBox.h:34
virtual ~TYMachine()
Definition: TYMachine.cpp:46
virtual TYBox volEnglob() const
Definition: TYMachine.cpp:195
QString getModele() const
Definition: TYMachine.h:124
QString _modele
Nom du modele.
Definition: TYMachine.h:158
virtual TYPoint centreGravite() const
Definition: TYMachine.cpp:200
TYMachine & operator=(const TYMachine &other)
Operateur =.
Definition: TYMachine.cpp:48
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYMachine.cpp:94
virtual TYTabPoint sommets() const
Definition: TYMachine.cpp:185
virtual bool setSrcsLw()
Definition: TYMachine.cpp:160
virtual double surface() const
Definition: TYMachine.cpp:175
void setConstructeur(QString name)
Definition: TYMachine.h:116
virtual TYTabLPPolygon faces() const
Definition: TYMachine.cpp:190
virtual TYTabSourcePonctuelleGeoNode getSrcs() const
Definition: TYMachine.cpp:145
virtual int isInside(const TYPoint &pt) const
Definition: TYMachine.cpp:210
void setCategorie(int cate)
Definition: TYMachine.h:101
virtual TYSourcePonctuelle srcPonctEquiv() const
Definition: TYMachine.cpp:150
virtual TYTabVector normals() const
Definition: TYMachine.cpp:180
QString getCommentaire() const
Definition: TYMachine.h:139
virtual void distriSrcs()
Definition: TYMachine.cpp:155
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYMachine.cpp:116
QString _constructeur
Nom du constructeur.
Definition: TYMachine.h:156
int getCategorie() const
Definition: TYMachine.h:94
QString getConstructeur() const
Definition: TYMachine.h:109
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
Definition: TYMachine.cpp:205
QString _commentaire
Commentaires.
Definition: TYMachine.h:160
bool operator!=(const TYMachine &other) const
Operateur !=.
Definition: TYMachine.cpp:89
bool operator==(const TYMachine &other) const
Operateur ==.
Definition: TYMachine.cpp:61
virtual bool updateAcoustic(const bool &force=false)
Definition: TYMachine.cpp:165
int _categorie
Categorie.
Definition: TYMachine.h:154
virtual double volume() const
Definition: TYMachine.cpp:170
void setCommentaire(QString name)
Definition: TYMachine.h:146
void setModele(QString name)
Definition: TYMachine.h:131
virtual std::string toString() const
Definition: TYMachine.cpp:111
virtual int fromXML(DOM_Element domElement)
Definition: TYMachine.cpp:128