[vtkusers] Actor -- isMovable?

David Doria daviddoria+vtk at gmail.com
Thu Nov 5 08:04:54 EST 2009


On Thu, Nov 5, 2009 at 7:52 AM, Cory Quammen <cquammen at cs.unc.edu> wrote:
> Piotr,
>
> The interactor style you have let's you switch between two modes. In
> one mode, you are moving the camera. Mouse motions in the window will
> affect the camera, but it will not change the actors position or
> orientation in world space. Sure, they appear to move on the screen,
> but what you see really comes from the camera moving. In this mode,
> calling PickableOff() won't have any effect because you aren't picking
> any actors.
>
> The other mode, however, lets you pick individual actors and change
> their position, orientation, and scale in world space. For this mode,
> you *can* pick actors and change these properties. Calling
> PickableOff() will have an effect here; it will prevent you from
> picking and subsequently modifying the actor position, orientation,
> and scale.
>
> In your code, the first mode is what you have.  To see what the second
> mode is like, you might try
>
> widget_3d.GetRenderWindow().GetInteractor().GetInteractorStyle().SetCurrentStyleToTrackballActor()
>
> This mode will let you manipulate individual actors, unless of course
> you set them to PickableOff(). This seems to me close to what are you
> going for.
>
> I hope that helps,
> Cory


Piotr,

I STRONGLY encourage you to do the following:

- Start a new project.
- Create sphere source and a cube source and position them next to each other.
- Convince yourself that in one mode you can move each actor
individually and in the other mode the camera moves around both
actors.
- Write a tiny tutorial about which keys to press to achieve each effect.
- Post the code + tutorial on the mailing list and/or wiki.

Sound like a plan?

Thanks,

David



More information about the vtkusers mailing list