[vtkusers] Setting the center of rotation

Florian Bruckner e0425375 at gmail.com
Fri Sep 23 13:23:33 EDT 2011


the only problem is that the camera focus point is equal to the
rotation center by default. The solution that i use in not to change
the focus point by panning, but instead change the window center by
SetWindowCenter().

hth
FloB


On Fri, Sep 23, 2011 at 6:31 PM, Maarten Beek <beekmaarten at yahoo.com> wrote:
> 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
>
>
>
> _______________________________________________
> 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
>
>



More information about the vtkusers mailing list