Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYVolumeInterface.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_VOLUMEINTERFACE__
21 #define __TY_VOLUMEINTERFACE__
22 
23 class OSegment3D;
24 
25 #include "TYBox.h"
26 #include "TYPoint.h"
27 #include "TYGeometryNode.h"
28 
34 {
35  // Methodes
36 public:
41 
49  virtual ~TYVolumeInterface(){};
50 
52 
57 
63  virtual double volume() const = 0;
64 
70  virtual double surface() const = 0;
71 
77  virtual double activeSurface() const = 0;
78  virtual double activeSurface() = 0;
79 
85  virtual TYTabVector normals() const = 0;
86 
92  virtual TYTabPoint sommets() const = 0;
93 
99  virtual TYTabLPPolygon faces() const = 0;
100 
106  virtual TYBox volEnglob() const;
107 
111  virtual void updateVolEnglob()
112  {
113  _volEnglob = volEnglob();
114  }
115 
119  const TYBox& getVolEnglob() const
120  {
121  return _volEnglob;
122  }
123 
127  const double& getRayonSphere() const
128  {
129  return _rayonSphere;
130  }
131 
135  void calculRayonSphere(const TYBox& volEnglob);
136 
142  virtual TYPoint centreGravite() const = 0;
143 
147  virtual void calculCentreGravite()
148  {
150  }
151 
155  const TYPoint& getCentreGravite() const
156  {
157  return _centreGravite;
158  }
159 
170  virtual int intersects(const OSegment3D& seg, TYTabPoint& ptList) const;
171 
181  virtual int isInside(const TYPoint& pt) const = 0;
182 
186  virtual void inverseNormales(){};
187 
188 private:
190 
191 protected:
193  double _rayonSphere;
195 };
196 
197 #endif // __TY_VOLUMEINTERFACE__
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
Class to define a segment.
Definition: 3d.h:1089
Definition: TYBox.h:34
virtual double volume() const =0
virtual double activeSurface() const =0
const TYBox & getVolEnglob() const
virtual int intersects(const OSegment3D &seg, TYTabPoint &ptList) const
const double & getRayonSphere() const
virtual TYTabLPPolygon faces() const =0
virtual TYBox volEnglob() const
virtual TYTabVector normals() const =0
void calculRayonSphere(const TYBox &volEnglob)
const TYPoint & getCentreGravite() const
virtual TYTabPoint sommets() const =0
virtual void calculCentreGravite()
virtual double surface() const =0
virtual void inverseNormales()
virtual double activeSurface()=0
virtual TYPoint centreGravite() const =0
virtual int isInside(const TYPoint &pt) const =0
virtual ~TYVolumeInterface()
virtual void updateVolEnglob()