[Paraview] set camera center of rotation

Li Guan li.9uan at gmail.com
Thu May 17 14:47:10 EDT 2012


Dear all,

I am trying to set the center of rotation of my environment w.r.t. the 3D
model I loaded.

pqView * view = pqActiveObjects::instance().activeView();
vtkSMRenderViewProxy *proxy =
vtkSMRenderViewProxy::SafeDownCast(view->getViewProxy());
...
...
proxy->GetRenderer()->AddActor(actor);
proxy->GetRenderer()->ResetCamera();
proxy->GetRenderWindow()->Render();

My problem is that when the model is loaded, it is located at the center of
the rendering window, however, when I use mouse to rotate the model, it
immediately moves w.r.t. a different center of location. In fact, I checked
the center of rotation is always 0,0,0 at "Adjust Camera" window, I thought
ResetCamera() function will adjust the center of rotation?

How do I set it the correct way so that the rotation is around my model?

Thanks a lot,

Li
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20120517/2a0d5812/attachment.htm>


More information about the ParaView mailing list