Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYVolumeInterface.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_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:1141
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()