Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYPlanEau.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_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:432
#define OPROTODECL(classname)
Definition: TYElement.h:65
#define TY_EXTENSION_DECL_ONLY(classname)
Definition: TYElement.h:386
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:692
bool operator!=(const TYPlanEau &other) const
Operateur !=.
Definition: TYPlanEau.cpp:96
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:115
virtual bool deepCopy(const TYElement *pOther, bool copyId=true, bool pUseCopyTag=false)
Definition: TYPlanEau.cpp:101
virtual int fromXML(DOM_Element domElement)
Definition: TYPlanEau.cpp:129
void setIsDMaxDefault(const bool &etat)
Definition: TYPlanEau.h:173
virtual ~TYPlanEau()
Definition: TYPlanEau.cpp:68
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:80
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:120
const double getDistMax() const
Definition: TYPlanEau.h:153
void offsetListPoints()
Definition: TYPlanEau.cpp:158
LPTYCourbeNiveau getCrbNiv()
Definition: TYPlanEau.h:84
TYPlanEau & operator=(const TYPlanEau &other)
Operateur =.
Definition: TYPlanEau.cpp:70
virtual void setIsGeometryModified(bool isModified)
Definition: TYPlanEau.cpp:148