1 // Copyright (C) 2007-2008 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.
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
19 // File : UnitTetraIntersectionBary.hxx
20 // Created : Tue Dec 9 16:06:33 2008
21 // Author : Edward AGAPOV (eap)
22 #ifndef __UNITTETRAINTERSECTIONBARY_HXX__
23 #define __UNITTETRAINTERSECTIONBARY_HXX__
25 #include "TransformedTriangle.hxx"
26 #include "INTERPKERNELDefines.hxx"
31 namespace INTERP_KERNEL
33 class INTERPKERNEL_EXPORT UnitTetraIntersectionBary : protected TransformedTriangle
36 UnitTetraIntersectionBary();
40 * \brief Stores a part of triangle common with the unit tetrahedron
41 * \param triangle - triangle side of other cell, whose calculateIntersectionVolume()
42 * must have already been called
44 void addSide(const TransformedTriangle& triangle);
47 * \brief Computes and return coordinates of barycentre
49 bool getBary(double* baryCenter);
52 * \brief Returns volume of intersection
55 inline double getVolume() const { return _int_volume; }
57 virtual ~UnitTetraIntersectionBary();
63 void setTriangleOnSide(int i);
65 void clearPolygons(bool andFaces=false);
67 /// volume of intersection
70 /// faces of intersection polyhedron
71 std::list< std::vector< double* > > _faces;