creaVtkCallbackPointPicker::creaVtkCallbackPointPicker(void)
{
- boxPointPicker=NULL;
+ boxPointPicker = NULL;
}
void creaVtkCallbackPointPicker::setBox(PointPicker *box)
{
- boxPointPicker=box;
+ boxPointPicker = box;
}
void creaVtkCallbackPointPicker::Execute(vtkObject *caller, unsigned long, void*)
int* pos = iren->GetEventPosition();
vtkCellPicker *picker = vtkCellPicker::New();
picker->SetTolerance(0.0005);
+
+ if (boxPointPicker->bbGetInputProp3D()!=NULL )
+ {
+ picker->AddPickList( boxPointPicker->bbGetInputProp3D() );
+ picker->PickFromListOn();
+ }
+
picker->Pick(pos[0], pos[1], 0, iren->GetRenderWindow()->GetRenderers()->GetFirstRenderer() );
double point[3];
bbSetOutputCellId(-1);
firsttime=true;
callPicker=NULL;
+ bbSetInputProp3D(NULL);
}
//=====
// 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_INPUT(Prop3D,vtkProp3D*);
BBTK_DECLARE_OUTPUT(Point,std::vector<double>);
BBTK_DECLARE_OUTPUT(Mesh,vtkProp3D*);
BBTK_DECLARE_OUTPUT(PointId,longInt);
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_INPUT(PointPicker,Prop3D,"vtkProp3D de reference. If this parameter is empty all actors in the render are used",vtkProp3D*,"");
BBTK_OUTPUT(PointPicker,Point,"Point (double)",std::vector<double>,"");
BBTK_OUTPUT(PointPicker,Mesh,"Mesh",vtkProp3D*,"");