[vtkusers] Setting Rotation center

Doug Hoppes dhoppes at mbfbioscience.com
Tue Nov 19 14:01:12 EST 2013


Hi all,

                I was wondering if there is a way to set the rotation point of the scene around a particular actor (without having the actor move to the center of the window)?  If I have 10 objects, I would like to select any of the objects and be able to rotate around that object.

                I tried using the vtkCamera->SetFocalPoint() so that the focal point is the location of the object, but that seems to always move the object to the center of the screen.  The rotation works fine, but it's not quite what I'm looking for.  If the object is off to the right-side of the scene, I would like to preserve its position (rather than shifting the actor to the center) and rotate around that actor.  I noticed some reference to the setWindowCenter.  Would it be appropriate to take the X/Y location of the actor and shift the windowcenter by that amount?  If so, how would I know how far to move (since the window center doesn't use pixel values).

Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20131119/6f9f953c/attachment.htm>


More information about the vtkusers mailing list