Salome HOME
updated copyright message
[plugins/blsurfplugin.git] / src / BLSURFPlugin / BLSURFPlugin_Attractor.hxx
index 693cc67326ee834e99cefa6c10747c2fa2013fc2..ae5f415edeb5f5558753698656efde05a4f97814 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2023  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 #include <NCollection_Map.hxx>
 
 #include <Geom_Surface.hxx>
-#include <Handle_Geom_Surface.hxx>
 #include <Geom2d_Curve.hxx>
-#include <Handle_Geom2d_Curve.hxx>
 #include <Geom_Curve.hxx>
-#include <Handle_Geom_Curve.hxx>
-#include <Handle_AIS_InteractiveObject.hxx>
 #include <TopoDS_Vertex.hxx>
 #include <TopoDS_Edge.hxx>
 #include <TopoDS_Wire.hxx>
@@ -92,6 +88,7 @@ class BLSURFPlugin_Attractor {
     
     bool init();                                                // Calculates the discrete points correponding to attractor 
                                                                 // and intialises the map of distances
+    void avoidOutOfBounds(int& i, int&j);
     void edgeInit(Handle(Geom_Surface) aSurf, const TopoDS_Edge& anEdge);
     
     double              GetSize (double u, double v);
@@ -138,8 +135,14 @@ class BLSURFPlugin_Attractor {
     
     bool              _isMapBuilt;
     bool              _isEmpty;
+
+  // data of a specific case: a point attractor on a plane
+  Handle(Geom_Surface) _plane;
+  gp_Pnt               _attractorPnt;
     
-    double            _distance(double u, double v);            // Retrieve the value of the distance map at point (u,v) of the parametric space of _face
+  double            (BLSURFPlugin_Attractor::*_distance)(double u, double v);            // Retrieve the value of the distance map at point (u,v) of the parametric space of _face
+  double            _distanceFromMap(double u, double v);
+  double            _distanceFromPoint(double u, double v);
 };    
 
 #endif