Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPlanEau.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 /*
17  *
18  */
19 
20 #ifndef __TY_PLAN_EAU__
21 #define __TY_PLAN_EAU__
22 
23 #include "TYTerrain.h"
24 #include "TYCourbeNiveau.h"
25 
32 class TYPlanEau : public TYTerrain
33 {
37 
38  // Methodes
39 public:
43  TYPlanEau();
47  TYPlanEau(const TYPlanEau& other);
51  TYPlanEau(const TYTabPoint& pts, double alt);
55  virtual ~TYPlanEau();
56 
58  TYPlanEau& operator=(const TYPlanEau& other);
60  bool operator==(const TYPlanEau& other) const;
62  bool operator!=(const TYPlanEau& other) const;
63 
72  virtual bool deepCopy(const TYElement* pOther, bool copyId = true, bool pUseCopyTag = false);
73 
74  virtual std::string toString() const;
75 
76  virtual DOM_Element toXML(DOM_Element& domElement);
77  virtual int fromXML(DOM_Element domElement);
78 
79  virtual void setIsGeometryModified(bool isModified);
80 
85  {
86  return _pCrbNiv;
87  }
88 
93  {
94  _pCrbNiv = pCrbNiv;
95  _pCrbNiv->setParent(this);
97  }
98 
102  double getAltitude() const
103  {
104  return _pCrbNiv->getAltitude();
105  }
109  void setAltitude(double alt)
110  {
111  _pCrbNiv->setAltitude(alt);
112  setIsGeometryModified(true);
113  }
114 
119  {
120  return _pCrbNiv._pObj->getListPoints();
121  }
125  virtual const TYTabPoint& getListPoints() const
126  {
127  return _pCrbNiv._pObj->getListPoints();
128  }
132  virtual void setListPoints(const TYTabPoint& liste)
133  {
134  _pCrbNiv->setListPoints(liste);
135  setIsGeometryModified(true);
136  }
137 
141  void setDistMax(const double dist)
142  {
143  _pCrbNiv->setDistMax(dist);
144  }
145 
149  double getDistMax()
150  {
151  return _pCrbNiv->getDistMax();
152  }
153  const double getDistMax() const
154  {
155  return _pCrbNiv->getDistMax();
156  };
157 
162  {
163  return _pCrbNiv->getIsDMaxDefault();
164  }
165  const bool getIsDMaxDefault() const
166  {
167  return _pCrbNiv->getIsDMaxDefault();
168  }
169 
173  void setIsDMaxDefault(const bool& etat)
174  {
175  _pCrbNiv->setIsDMaxDefault(etat);
176  }
177 
182  {
184  }
185 
189  void offsetListPoints();
190 
191  // Membres
192 protected:
195 };
196 
202 typedef std::vector<LPTYPlanEauGeoNode> TYTabPlanEauGeoNode;
203 
204 #endif // __TY_PLAN_EAU__
QDomElement DOM_Element
Definition: QT2DOM.h:30
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
#define TY_EXT_GRAPHIC_DECL_ONLY(classname)
Definition: TYElement.h:430
#define OPROTODECL(classname)
Definition: TYElement.h:64
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:385
SmartPtr< TYPlanEauGeoNode > LPTYPlanEauGeoNode
Smart Pointer sur TYPlanEauGeoNode.
Definition: TYPlanEau.h:200
TYGeometryNode TYPlanEauGeoNode
Noeud geometrique de type TYPlanEau.
Definition: TYPlanEau.h:198
std::vector< LPTYPlanEauGeoNode > TYTabPlanEauGeoNode
Collection de noeuds geometriques de type TYPlanEau.
Definition: TYPlanEau.h:202
T * _pObj
The real pointer, must derived IRefCount.
Definition: smartptr.h:307
void setListPoints(const TYTabPoint &pts)
double getAltitude() const
bool getIsDMaxDefault()
void setDistMax(const double dist)
TYTabPoint & getListPoints()
void setAltitude(double alt)
void setIsDMaxDefault(const bool &etat)
void setParent(TYElement *pParent)
Definition: TYElement.h:699
bool operator!=(const TYPlanEau &other) const
Operateur !=.
Definition: TYPlanEau.cpp:97
virtual void setListPoints(const TYTabPoint &liste)
Definition: TYPlanEau.h:132
LPTYCourbeNiveau _pCrbNiv
Une courbe de niveau correspondant a ce plan d'eau.
Definition: TYPlanEau.h:194
void setAltitude(double alt)
Definition: TYPlanEau.h:109
virtual std::string toString() const
Definition: TYPlanEau.cpp:116
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYPlanEau.cpp:102
virtual int fromXML(DOM_Element domElement)
Definition: TYPlanEau.cpp:130
void setIsDMaxDefault(const bool &etat)
Definition: TYPlanEau.h:173
virtual ~TYPlanEau()
Definition: TYPlanEau.cpp:69
void setDistMax(const double dist)
Definition: TYPlanEau.h:141
double getDistMax()
Definition: TYPlanEau.h:149
const bool getIsDMaxDefault() const
Definition: TYPlanEau.h:165
virtual TYTabPoint & getListPoints()
Definition: TYPlanEau.h:118
void setCrbNiv(LPTYCourbeNiveau pCrbNiv)
Definition: TYPlanEau.h:92
void updateDistMax()
Definition: TYPlanEau.h:181
bool getIsDMaxDefault()
Definition: TYPlanEau.h:161
bool operator==(const TYPlanEau &other) const
Operateur ==.
Definition: TYPlanEau.cpp:81
double getAltitude() const
Definition: TYPlanEau.h:102
virtual const TYTabPoint & getListPoints() const
Definition: TYPlanEau.h:125
virtual DOM_Element toXML(DOM_Element &domElement)
Definition: TYPlanEau.cpp:121
const double getDistMax() const
Definition: TYPlanEau.h:153
void offsetListPoints()
Definition: TYPlanEau.cpp:159
LPTYCourbeNiveau getCrbNiv()
Definition: TYPlanEau.h:84
TYPlanEau & operator=(const TYPlanEau &other)
Operateur =.
Definition: TYPlanEau.cpp:71
virtual void setIsGeometryModified(bool isModified)
Definition: TYPlanEau.cpp:149