Salome HOME
Implementation of MEDCoupling1SGTUMesh.computeTriangleHeight and DataArrayDouble...
[tools/medcoupling.git] / src / INTERP_KERNEL / TargetIntersector.hxx
index e9ff9e01fa7c7d789b1bc63d992f47796fef71db..c0613c7de88a7af978a945fe7e2165e01dc43d8d 100644 (file)
@@ -1,21 +1,23 @@
-//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2022  CEA/DEN, EDF R&D
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+// Author : Anthony Geay (CEA/DEN)
+
 #ifndef __TARGETINTERSECTOR__HXX__
 #define __TARGETINTERSECTOR__HXX__
 
@@ -34,24 +36,23 @@ namespace INTERP_KERNEL
   class TargetIntersector
   {
   public:
+    static const int SPACEDIM=MyMeshType::MY_SPACEDIM;
     typedef typename MyMeshType::MyConnType ConnType;
   public:
-    /*!
-     * \addtogroup InterpKerGrpIntPlan
-     * @{
-     */
     /*!
      * Tool for cell intersection, result is always positive.
-     * @param icellT id of cell in target mesh in \b C \b mode.
-     * @param icellsS ids of cells in source mesh in \b C \b mode.
+     * @param targetCell id of cell in target mesh in \b C \b mode.
+     * @param srcCells ids of cells in source mesh in \b C \b mode.
      * @param res is an IN/OUT parameter that represents the icellTth row in final matrix, fed with at most icellsS elements. 
      */
     virtual void intersectCells(ConnType targetCell, const std::vector<ConnType>& srcCells, MyMatrix& res) = 0;
-    //! @}
-    //Tool for cell filtering
-    virtual int getNumberOfRowsOfResMatrix() const = 0;
-    virtual int getNumberOfColsOfResMatrix() const = 0;
+
+    virtual ConnType getNumberOfRowsOfResMatrix() const = 0;
+    virtual ConnType getNumberOfColsOfResMatrix() const = 0;
+
     virtual ~TargetIntersector() { }
+    void adjustBoundingBoxes(std::vector<double>& bbox, double adjustmentEps, double adjustmentEpsAbs);
+    void adjustBoundingBoxes(double *bbox, std::size_t sz, double adjustmentEps, double adjustmentEpsAbs);
   };
 }