[vtkusers] How to read the pick actor in vtk ?

ankitramani ankitvtk at googlemail.com
Wed Mar 7 07:31:40 EST 2012


I am using following code to get a picked actor. But it is not working.
****************************************************************************
                                if (event ==
vtkCommand::LeftButtonPressEvent)
				{
					int currPos[2];
					interactor->GetEventPosition(currPos);
					vtkPropPicker *picker=vtkPropPicker::New();
					picker->Pick(currPos[0], currPos[1], 0,  this->renderer3D);
					interactor->SetPicker(picker);
					
					if(picker->GetActor() == tempCylinderActor)
					{
						this->tempAssembly->RemovePart(this->tempLineActor);
					}
                                }
****************************************************************************
I am clicking on vtkActor "tempCylinderActor", but it is not goind inside
"if loop"........please help me in getting picked actor...........

--
View this message in context: http://vtk.1045678.n5.nabble.com/How-to-read-the-pick-actor-in-vtk-tp5543971p5543971.html
Sent from the VTK - Users mailing list archive at Nabble.com.



More information about the vtkusers mailing list