[vtkusers] Simple Point Picker Question-
Ryan Smith
ryanleesmith at gmail.com
Tue Aug 30 17:09:45 EDT 2011
Hi-
I have an application using FLTK and VTK together via
the vtkFlRenderWindowInteractor class. I have my point picking working
after using the following example
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/PointPicker
My concern is that I am only displaying a 2D image and after enabling
interaction, the camera swings around in 3D when the user picks a point and
distorts my image. Can I modify the following code to allow point picking
but disable the camera view from moving? Thanks in advance-
-Ryan
class MouseInteractorStylePP : public vtkInteractorStyleTrackballCamera{
public:
static MouseInteractorStylePP* New();
vtkTypeMacro(MouseInteractorStylePP, vtkInteractorStyleTrackballCamera);
virtual void OnLeftButtonDown()
{
std::cout << "Picking pixel: " <<
this->Interactor->GetEventPosition()[0] << " " <<
this->Interactor->GetEventPosition()[1] << std::endl;
vtkInteractorStyleTrackballCamera::OnLeftButtonDown();
}
};
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110830/d7a152bc/attachment.htm>
More information about the vtkusers
mailing list