[vtkusers] How to generate a point in 3D and change its location through dragging

Xiaopeng Yang yxp233 at postech.ac.kr
Fri Aug 26 10:53:40 EDT 2011


Hi David,

Last time you sent me this example to change the location of a 3D point. In
this example, I cannot rotate, translate the image through mouse event. Only
thing that I can do is to drag the point to a new position. I found that
using vtkInteractorStyleTrackballActor does not allow the default vtk
interaction. So I changed it into vtkInteractorStyleTrackballCamera which
allows the default vtk interaction. However, error occurred when I debugged
the code. The error comes from " this->InteractionProp = this->MoveActor;":
the InteractionProp is not a member of vtkInteractorStyleTrackballCamera.

So what should I do to not only change the point location, but also rotate,
translate, and zoom in/out the image?

Thanks,
Xiaopeng

-----Original Message-----
From: David Doria [mailto:daviddoria at gmail.com] 
Sent: Wednesday, August 17, 2011 10:55 PM
To: Xiaopeng Yang
Cc: vtk
Subject: Re: [vtkusers] How to generate a point in 3D and change its
location through dragging

On Tue, Aug 16, 2011 at 11:30 PM, Xiaopeng Yang <yxp233 at postech.ac.kr>
wrote:
> Dear Users,
>
> I would like to generate a 3D point and then change its location through
> mouse clicking and dragging. Does anybody have any good idea?

Check out this example:
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Interaction/MoveAVertex

David










More information about the vtkusers mailing list