Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYRay.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 #ifndef _TYRAY_
17 #define _TYRAY_
18 
22 
31 class TYSourcePonctuelle;
32 class TYPointCalcul;
33 
34 class TYRay : public TYElement, public acoustic_path
35 {
38 
39 public:
44  TYRay();
45 
50  TYRay(const acoustic_path& ap) : TYElement(), acoustic_path(ap) {}
51 
56  TYRay(const TYRay& ray);
57 
58  // Destructor
59  ~TYRay();
60 
65  virtual TYRay& operator=(const TYRay& other);
66 
71  bool deepCopy(TYRay* pOther, bool copyId, bool pUseCopyTag = false);
72 
81  virtual DOM_Element toXML(DOM_Element& domElement) /* const */;
82 
91  virtual int fromXML(DOM_Element domElement);
92 
98  {
99  _source = source;
100  }
101 
107  {
108  return _source;
109  }
110 
116  {
117  _recepteur = recep;
118  }
119 
125  {
126  return _recepteur;
127  }
128 
129 protected:
135 };
136 // Smart Pointer sur TYRay
138 
139 typedef std::vector<LPTYRay> TYTabRay;
140 
146 
147 #endif
All base classes related to 3D manipulation.
QDomElement DOM_Element
Definition: QT2DOM.h:30
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
std::vector< LPTYRay > TYTabRay
Definition: TYRay.h:139
SmartPtr< TYRay > build_ray(const acoustic_path &ap)
Build a TYRay from an acoustic_path (used by cython interface)
Definition: TYRay.cpp:167
SmartPtr< TYRay > LPTYRay
Definition: TYRay.h:137
The 3D point class.
Definition: 3d.h:487
Classe de definition d'un point de calcul.C'est une classe derivee a TYPoint avec en plus un spectrep...
Definition: TYPointCalcul.h:33
Classe decrivant un rayon acoustique gere par un lancer de rayon. Cette classe doit permettre la mode...
Definition: TYRay.h:35
TYPointCalcul * getRecepteur()
Recuperation du recepteur du rayon.
Definition: TYRay.h:124
OPoint3D _posSourceGlobal
Definition: TYRay.h:133
OPoint3D _posReceptGlobal
Definition: TYRay.h:134
void setRecepteur(TYPointCalcul *recep)
Place le recepteur du rayon. Le dernier point de la polyligne est mis a jour.
Definition: TYRay.h:115
void setSource(TYSourcePonctuelle *source)
Place la source du rayon.
Definition: TYRay.h:97
TYRay()
Constructeur par defaut.
Definition: TYRay.cpp:26
bool deepCopy(TYRay *pOther, bool copyId, bool pUseCopyTag=false)
Deep copy of a ray mainly the events tab.
Definition: TYRay.cpp:49
TYSourcePonctuelle * getSource()
Recuperation de la source du rayon.
Definition: TYRay.h:106
TYPointCalcul * _recepteur
Definition: TYRay.h:132
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYRay.cpp:62
int _identifiant
Definition: TYRay.h:130
TYSourcePonctuelle * _source
Definition: TYRay.h:131
virtual int fromXML(DOM_Element domElement)
Definition: TYRay.cpp:103
virtual TYRay & operator=(const TYRay &other)
equal operator
Definition: TYRay.cpp:39
TYRay(const acoustic_path &ap)
Build a TYRay from an acoustic_path.
Definition: TYRay.h:50
~TYRay()
Definition: TYRay.cpp:37
Acoustic path.
Definition: acoustic_path.h:78