[vtkusers] Setting the center of rotation

Maarten Beek beekmaarten at yahoo.com
Fri Sep 23 12:31:10 EDT 2011


Two suggestions come to my mind:


1 - What about doing the same in VTK as you would in OpenGL?

2 - Setting the focal point of the vtkCamera, perhaps also requires to set the location of the camera.

Maarten



________________________________
From: Wayne Christopher <wayne at 4raccoons.com>
To: vtkusers <vtkusers at vtk.org>
Sent: Monday, September 12, 2011 10:05:19 AM
Subject: [vtkusers] Setting the center of rotation

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
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Follow this link to subscribe/unsubscribe:
http://www.vtk.org/mailman/listinfo/vtkusers
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110923/4f54304a/attachment.htm>


More information about the vtkusers mailing list