[vtkusers] Making Camera stationary

divya divya at triassicsolutions.com
Fri Jun 28 05:58:56 EDT 2013


Hi David,

Thank you for the reply.

I have 3 actors in my scene, and I want them to rotate together (as they
would do when we move the camera), but I need to get the orientation of a
particular actor, every time I move it. vtkInteractorStyleTrackballActor
moves objects in the scene independent of each other, therefore I cannot use
it. 

-----Original Message-----
From: David Doria [mailto:daviddoria at gmail.com] 
Sent: Wednesday, June 26, 2013 11:18 PM
To: divya
Cc: Vtk Users
Subject: Re: [vtkusers] Making Camera stationary

On Wed, Jun 26, 2013 at 6:18 AM, divya <divya at triassicsolutions.com> wrote:
>
> Dear VTK users,
>
>  I am trying to get the position(x, y, z) of the actor when its rotating.
When i use an event VTKRenderWindowInteractor EndInteractionEvt,   the
'actor.GetOrientation();' returns 0 values for the coordinate. I figured out
the reason could be because the camera is rotating and not the actor, for
this when I tried to rotating the actor after clicking 'a' from the
keyboard, it works fine. Can this be made the default behavior? ie. Can the
camera be made stationary and the actor is moved.

You need to use vtkInteractorStyleTrackballActor instead of
vtkInteractorStyleTrackballCamera

http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/MoveActor

David





More information about the vtkusers mailing list