1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
8 // This library 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. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // File : UnitTetraIntersectionBary.hxx
21 // Created : Tue Dec 9 16:06:33 2008
22 // Author : Edward AGAPOV (eap)
24 #ifndef __UNITTETRAINTERSECTIONBARY_HXX__
25 #define __UNITTETRAINTERSECTIONBARY_HXX__
27 #include "TransformedTriangle.hxx"
28 #include "INTERPKERNELDefines.hxx"
33 namespace INTERP_KERNEL
35 class UnitTetraIntersectionBary : protected TransformedTriangle
38 INTERPKERNEL_EXPORT UnitTetraIntersectionBary(bool isTetraInversed=false);
40 INTERPKERNEL_EXPORT void init(bool isTetraInversed=false);
42 * \brief Stores a part of triangle common with the unit tetrahedron
43 * \param triangle - triangle side of other cell, whose calculateIntersectionVolume()
44 * must have already been called
46 INTERPKERNEL_EXPORT void addSide(const TransformedTriangle& triangle);
49 * \brief Computes and return coordinates of barycentre
51 INTERPKERNEL_EXPORT bool getBary(double* baryCenter);
54 * \brief Returns volume of intersection
57 INTERPKERNEL_EXPORT inline double getVolume() const { return _int_volume; }
59 INTERPKERNEL_EXPORT virtual ~UnitTetraIntersectionBary();
65 void setTriangleOnSide(int i);
67 void clearPolygons(bool andFaces=false);
69 /// volume of intersection
72 /// faces of intersection polyhedron
73 std::list< std::vector< double* > > _faces;
74 std::vector< std::vector< double > > _polyNormals;
76 bool _isTetraInversed;