Code_TYMPAN  4.4.0
Industrial site acoustic simulation
TYSurfaceInterface.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_SURFACEINTERFACE__
21 #define __TY_SURFACEINTERFACE__
22 
23 #include <deque>
24 
25 class OSegment3D;
26 class OPoint3D;
27 class OPlan;
28 class OTriangle;
29 class TYGeometryNode;
30 
36 {
37  // Methodes
38 public:
43 
51  virtual ~TYSurfaceInterface(){};
52 
54 
59 
63  virtual double surface() const = 0;
64 
68  virtual OVector3D normal() const = 0;
69 
73  virtual OPlan plan() const = 0;
74 
88  virtual TYTabPoint getContour(int n = -1) const = 0;
89 
90  virtual TYTabPoint3D getOContour(int n = -1) const = 0;
91 
101  virtual int intersects(const OPoint3D& pt) const = 0;
102 
113  virtual int intersects(const OSegment3D& seg, OPoint3D& pt) const = 0;
114 
125  virtual int intersects(const TYSurfaceInterface* pSurf, OSegment3D& seg) const;
126 
137  virtual int intersectsPlan(const OPlan& plan, OSegment3D& seg) const;
138 
142  virtual void inverseNormale(){};
143 
145 
159  virtual void exportMesh(std::deque<OPoint3D>& points, std::deque<OTriangle>& triangles,
160  const TYGeometryNode& geonode) const /* = 0 */;
161 };
162 
163 #endif // __TY_SURFACEINTERFACE__
std::vector< TYPoint > TYTabPoint
Collection de TYPoint.
Definition: TYDefines.h:340
std::deque< OPoint3D > TYTabPoint3D
Collection de OPoint3D.
Definition: TYDefines.h:403
Plan defined by its equation : ax+by+cz+d=0.
Definition: plan.h:31
The 3D point class.
Definition: 3d.h:487
Class to define a segment.
Definition: 3d.h:1089
Triangle class.
Definition: triangle.h:28
The 3D vector class.
Definition: 3d.h:298
virtual void inverseNormale()
virtual TYTabPoint getContour(int n=-1) const =0
virtual int intersectsPlan(const OPlan &plan, OSegment3D &seg) const
virtual double surface() const =0
virtual int intersects(const OPoint3D &pt) const =0
virtual int intersects(const OSegment3D &seg, OPoint3D &pt) const =0
virtual TYTabPoint3D getOContour(int n=-1) const =0
virtual OPlan plan() const =0
virtual void exportMesh(std::deque< OPoint3D > &points, std::deque< OTriangle > &triangles, const TYGeometryNode &geonode) const
Exports the surface as a triangular mesh inglobal reference frame.
virtual OVector3D normal() const =0