Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYRay.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 #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:430
#define OPROTODECL(classname)
Definition: TYElement.h:64
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:165
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:24
bool deepCopy(TYRay *pOther, bool copyId, bool pUseCopyTag=false)
Deep copy of a ray mainly the events tab.
Definition: TYRay.cpp:47
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:60
int _identifiant
Definition: TYRay.h:130
TYSourcePonctuelle * _source
Definition: TYRay.h:131
virtual int fromXML(DOM_Element domElement)
Definition: TYRay.cpp:101
virtual TYRay & operator=(const TYRay &other)
equal operator
Definition: TYRay.cpp:37
TYRay(const acoustic_path &ap)
Build a TYRay from an acoustic_path.
Definition: TYRay.h:50
~TYRay()
Definition: TYRay.cpp:35
Acoustic path.
Definition: acoustic_path.h:78