]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkPointPicker.cxx
Clean code
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPointPicker.cxx
index df5424ab152ed95d99f140e8ea13792b1efb7d06..7bcdd934d91304ab5a235c6f1e0c61638d2a9713 100644 (file)
@@ -53,6 +53,7 @@ void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*
                 boxPointPicker->bbSetOutputPoint( vecPoint );
                 boxPointPicker->bbSetOutputMesh( picker->GetProp3D() );
                 boxPointPicker->bbSetOutputPointId( picker->GetPointId() );
+
                 boxPointPicker->bbSetOutputCellId( picker->GetCellId() );
                 vtkDataSet *dataset = picker->GetDataSet();
                 if (strcmp(dataset->GetClassName(),"vtkPolyData")==0)
@@ -85,6 +86,7 @@ void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*
                } // if Active
        } // if boxPoiintPicker
 
+    
 /*
 {
  
@@ -145,8 +147,6 @@ void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*
         }
 */
 
-
-
 }
 
 
@@ -162,7 +162,6 @@ BBTK_BLACK_BOX_IMPLEMENTATION(PointPicker,bbtk::AtomicBlackBox);
 //===== 
 void PointPicker::Process()
 {
-
 // THE MAIN PROCESSING METHOD BODY
 //   Here we simply set the input 'In' value to the output 'Out'
 //   And print out the output value
@@ -178,6 +177,8 @@ void PointPicker::Process()
 //    bbSetOutputOut( bbGetInputIn() );
 //    std::cout << "Output value = " <<bbGetOutputOut() << std::endl;
   
+    printf("EED PointPicker::Process  %s\n", bbGetFullName().c_str()  );
+    
        if (firsttime==true)
        {
                firsttime = false;
@@ -196,10 +197,8 @@ void PointPicker::Process()
                picker->AddObserver( vtkCommand::MouseMoveEvent , callPicker );
                bbGetInputRenderer()->GetRenderWindow()->GetInteractor()->SetPicker(picker);
 */
-
                callPicker = creaVtkCallbackPointPicker::New();
                callPicker->setBox( this );
-
        } // if firsttime
 
 
@@ -229,9 +228,21 @@ void PointPicker::Process()
        } // if bbGetInputRenderer()
 
                
-
-
+//  std::vector<double> lstPoint;
+//  lstPoint.push_back(0);
+//  lstPoint.push_back(0);
+//  lstPoint.push_back(1);
+//  bbSetOutputPoint( lstPoint );
+    
+// BORRAME    bbSetOutputPoint( bbGetInputDefaultPoint() );
+    
+//  bbSetOutputMesh( NULL );
+// Borrame    bbSetOutputPointId( bbGetInputDefaultPointId() );
+//  bbSetOutputCellId( -1 );
+//  bbSetOutputNormal( lstPoint );
+    
 }
+
 //===== 
 // 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)
 //===== 
@@ -242,6 +253,7 @@ void PointPicker::bbUserSetDefaultValues()
 //   bbSetInputIn(0);
        bbSetInputActive(true);
        bbSetInputTypeEvent(0);
+    bbSetInputDefaultPointId( -1 );
        bbSetOutputMesh(NULL);
        bbSetOutputPointId(-1);
        bbSetOutputCellId(-1);
@@ -253,33 +265,36 @@ void PointPicker::bbUserSetDefaultValues()
     lstNormal.push_back(0);
     lstNormal.push_back(1);
     bbSetOutputNormal( lstNormal );
+    
+    std::vector<double> point;
+    point.push_back(20);
+    point.push_back(20);
+    point.push_back(20);
+    bbSetOutputPoint( point );
 }
+
 //===== 
 // 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)
 //===== 
 void PointPicker::bbUserInitializeProcessing()
 {
-
 //  THE INITIALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should allocate the internal/output pointers 
-//    if any 
-
-  
+//    if any
 }
+
 //===== 
 // 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)
 //===== 
 void PointPicker::bbUserFinalizeProcessing()
 {
-
 //  THE FINALIZATION METHOD BODY :
 //    Here does nothing 
 //    but this is where you should desallocate the internal/output pointers 
 //    if any
-  
 }
-}
-// EO namespace bbcreaVtk
+
+}// EO namespace bbcreaVtk