]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkPointPickerNearest.cxx
#3493 MeshManager
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPointPickerNearest.cxx
index e7534a069ab55cb9b223f1a665fa9e9c9556a7f5..12ea924ef258844f9a0b5fafc040904e1d87ab32 100644 (file)
@@ -31,7 +31,6 @@ void PointPickerNearest::Process()
 //    * TYPE is the C++ type of the input/output
 //      (the one provided in the attribute 'type' of the tag 'input')
 
-
     std::vector<double> lstNormal;
     std::vector<double> refPoint = bbGetInputPoint();
 
@@ -85,9 +84,24 @@ void PointPickerNearest::Process()
         } // if iBack
         bbSetOutputPointId( iBack );
         bbSetOutputNormal( lstNormal );
+        std::vector<double> lstPointOut;
+        if (iBack>=0)
+        {
+            points->GetPoint(iBack,p);
+            lstPointOut.push_back(p[0]);
+            lstPointOut.push_back(p[1]);
+            lstPointOut.push_back(p[2]);
+        }// if iBack
+        bbSetOutputPointOut( lstPointOut );
+        bbSignalOutputModification();
     } else {
         bbSetOutputPointId( -1 );
+        lstNormal.push_back(0);
+        lstNormal.push_back(1);
+        lstNormal.push_back(2);
         bbSetOutputNormal( lstNormal );
+        bbSetOutputPointOut( bbGetInputPoint() );
+        bbSignalOutputModification();
     }
 }
 //===== 
@@ -100,7 +114,7 @@ void PointPickerNearest::bbUserSetDefaultValues()
 //    Here we initialize the input 'In' to 0
     bbSetInputActive(false);
     bbSetInputMesh(NULL);
-    bbSetInputBorder(10);
+    bbSetInputBorder(5);
 }
 //===== 
 // Before editing this file, make sure it's a file of your own (i.e.: it wasn't generated from xml description; if so : your modifications will be lost)