Salome HOME
Implementation of MEDCoupling1SGTUMesh.computeTriangleHeight and DataArrayDouble...
[tools/medcoupling.git] / src / INTERP_KERNEL / CurveIntersector.hxx
index e1c3e69cec3076eb620fbc6c91abeb889d87335d..f60ec6dd150bf5a65c0dc6c926dbe0868944efe9 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2015  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
@@ -21,7 +21,7 @@
 #ifndef __CURVEINTERSECTOR_HXX__
 #define __CURVEINTERSECTOR_HXX__
 
-#include "TargetIntersector.hxx"
+#include "TargetIntersector.txx"
 #include "NormalizedUnstructuredMesh.hxx"
 
 namespace INTERP_KERNEL
@@ -39,10 +39,10 @@ namespace INTERP_KERNEL
                      double  precision, double adjustmentEpsAbs, double medianLine, int printLevel);
     virtual ~CurveIntersector();
     void createBoundingBoxes(const MyMeshType& mesh, std::vector<double>& bbox);
-    void adjustBoundingBoxes(std::vector<double>& bbox, double adjustmentEpsAbs);
     static void getElemBB(double* bb, const MyMeshType& mesh, ConnType iP, ConnType nb_nodes);
-    static bool ComputeBaryCoordsOf(double startOfSeg, double endOfSeg, double pt, double& startPos, double& endPos);
+    static void ComputeBaryCoordsOf(double startOfSeg, double endOfSeg, double pt, double& startPos, double& endPos);
   protected :
+    bool projectionThis(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt) const;
     bool projectionThis(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt0, double& xt1) const;
     bool getRealTargetCoordinates(ConnType icellT, std::vector<double>& coordsT) const;
     typename MyMeshType::MyConnType getNodeIdOfTargetCellAt(ConnType icellT, ConnType nodeIdInCellT) const;
@@ -50,11 +50,12 @@ namespace INTERP_KERNEL
     typename MyMeshType::MyConnType getNodeIdOfSourceCellAt(ConnType icellT, ConnType nodeIdInCellT) const;
     double intersectSegments(const double *coordsT, const double *coordsS) const;
     double intersectSegmentsInternal(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt0, double& xt1) const;
+    bool isPtIncludedInSeg(const double *coordsT, const double *coordsS, double& xs0, double& xs1, double& xt) const;
     
     struct TDualSegment
     {
       std::vector<double> _coords;
-      int                 _nodeId; // in mesh mode
+      ConnType            _nodeId; // in mesh mode
     };
     static void getDualSegments(ConnType                   icell,
                                 const MyMeshType&          mesh,