[vtkusers] Setting the center of rotation

Wayne Christopher wayne at 4raccoons.com
Mon Sep 12 10:05:19 EDT 2011


I have seen this question asked a few times with no solutions - if it's 
not possible to do, could somebody confirm this?  Do I need to write my 
own interactor?

I am using a trackball interactor to manipulate a scene with a number of 
actors.  I zoom in to one area of one actor, and when I rotate the 
scene, I want the center of rotation to be a point that I can select on 
the visible actor - that is, not the center of the entire scene, which 
would cause what I'm looking at to move out of the screen.  How can I do 
that?

Setting the focal point of the camera causes the scene to pan and move 
this point to the center of the screen, which is not what I want.  Also 
after panning with the middle button, the center of rotation does not 
stay where it was set.

If I were doing this in OpenGL I would apply a transform to translate 
the center point to the origin, then apply rotation and scaling 
operations, then translate the origin back to the center point.

Thanks,

     Wayne



More information about the vtkusers mailing list