]> Creatis software - creaVtk.git/blobdiff - bbtk_creaVtk_PKG/src/bbcreaVtkPointPicker.h
#3459 Feuture box PointPicker
[creaVtk.git] / bbtk_creaVtk_PKG / src / bbcreaVtkPointPicker.h
index 804309f09e400a12d7ab94e8e9be0b6373e800ba..94c9d376d7ececb1d289e03e7e19a44497269f2c 100644 (file)
@@ -9,18 +9,28 @@
 
 #include "vtkCommand.h"
 #include "vtkRenderer.h"
+#include "vtkProp3D.h"
+#include <vtkRenderWindowInteractor.h>
+
 
 namespace bbcreaVtk
 {
 
+class PointPicker;
 
 //---------------------------------------------
 class creaVtkCallbackPointPicker : public vtkCommand
 {
+       
        public:
+               creaVtkCallbackPointPicker();
+               
                static creaVtkCallbackPointPicker *New() { return new creaVtkCallbackPointPicker; }
                void Delete() { delete this; }
                virtual void Execute(vtkObject *caller, unsigned long, void*);
+               void setBox(PointPicker *box);
+       private:
+               PointPicker *boxPointPicker;            
                
 };
 
@@ -29,6 +39,7 @@ class creaVtkCallbackPointPicker : public vtkCommand
 //---------------------------------------------
 //---------------------------------------------
 
+typedef  long int longInt;
 
 class bbcreaVtk_EXPORT PointPicker
  : 
@@ -38,24 +49,39 @@ class bbcreaVtk_EXPORT PointPicker
 //===== 
 // 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)
 //===== 
+  BBTK_DECLARE_INPUT(Active,bool);
+  BBTK_DECLARE_INPUT(TypeEvent,int );
   BBTK_DECLARE_INPUT(Renderer,vtkRenderer*);
-  BBTK_DECLARE_OUTPUT(Out,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(Point,std::vector<double>);
+  BBTK_DECLARE_OUTPUT(Mesh,vtkProp3D*);
+  BBTK_DECLARE_OUTPUT(PointId,longInt);
+  BBTK_DECLARE_OUTPUT(CellId,longInt);
   BBTK_PROCESS(Process);
   void Process();
 
   bool firsttime;
+  creaVtkCallbackPointPicker *callPicker;
+  
 //===== 
 // 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)
 //===== 
 };
 
 BBTK_BEGIN_DESCRIBE_BLACK_BOX(PointPicker,bbtk::AtomicBlackBox);
-BBTK_NAME("PointPicker");
-BBTK_AUTHOR("InfoDev");
-BBTK_DESCRIPTION("No Description.");
-BBTK_CATEGORY("empty");
-BBTK_INPUT(PointPicker,Renderer,"vtk Renderer",vtkRenderer*,"");
-BBTK_OUTPUT(PointPicker,Out,"First output",std::vector<double>,"");
+  BBTK_NAME("PointPicker");
+  BBTK_AUTHOR("InfoDev");
+  BBTK_DESCRIPTION("No Description.");
+  BBTK_CATEGORY("empty");
+
+  BBTK_INPUT(PointPicker,Active,"(true default)  true/false",bool,"");
+  BBTK_INPUT(PointPicker,TypeEvent,"(0 default) 0:NOTHING,  1:MouseMoveEvent  2:LeftButtonPressEvent  3:LeftButtonDoubleClickEvent",int,"");
+  BBTK_INPUT(PointPicker,Renderer,"vtk Renderer",vtkRenderer*,"");
+
+  BBTK_OUTPUT(PointPicker,Point,"Point (double)",std::vector<double>,"");
+  BBTK_OUTPUT(PointPicker,Mesh,"Mesh",vtkProp3D*,"");
+  BBTK_OUTPUT(PointPicker,PointId,"Point Id in Mesh",longInt,"");
+  BBTK_OUTPUT(PointPicker,CellId,"Cell Id in Mesh",longInt,"");
+
 BBTK_END_DESCRIBE_BLACK_BOX(PointPicker);
 //===== 
 // 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)