[vtkusers] Coupling multiple cameras
Jonas Juselius
jonas.juselius at uit.no
Mon Apr 2 11:43:51 EDT 2012
I figured it out. It was simply a matter of setting the origin to the
center of the bounding box. Sorry for the noise, but it's hard to learn
VTK from the class documentation... Perhaps I should buy the book ;)
Jonas
On 02. april 2012 16:24, Jonas Juselius wrote:
> I tried that, but I ended up in the woods. The problem is that I need to
> apply some (actor dependent) rotations to each actor. I use
> vtkTransform::RotateX(), etc. But for some strange reason, this causes
> the camera view/transformation to go bananas. The real problem it seems,
> is that I must do a CameraReset() in order to get the camera nicely
> centered on each actor. When I transform, the camera is not pointing
> correctly at the actors anymore. Does anyone know how to solve this problem?
>
> Jonas
>
>
> On 02. april 2012 15:32, Jothybasu Selvaraj wrote:
>> This does exactly what you need
>>
>> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Utilities/ShareCamera
>>
>> Jothy
>>
>> On Mon, Apr 2, 2012 at 1:31 PM, Jonas Juselius <jonas.juselius at uit.no
>> <mailto:jonas.juselius at uit.no>> wrote:
>>
>> Hi!
>>
>> I have the following problem: I have four actors, each with its own
>> renderer. The renderers are tiled onto the rendering window using
>> viewports, the cameras are reset for each renderer and the window is
>> given an interactor. So far so good; I can rotate each of the cameras
>> around each actor. Now I would like to couple the cameras, so that when
>> I interact/move one camera, the others move in unison, i.e. that I get
>> the same transformation for all four cameras/actors. How do I do this?
>> Is there a better solution than using multiple viewports and cameras?
>>
>> Best regards, Jonas
>>
>> --
>> Dr. Jonas Juselius <jonas.juselius at uit.no
>> <mailto:jonas.juselius at uit.no>>
>> High Performance Computing Group, University of Tromsø
>> Tel. +47 776 60400 <tel:%2B47%20776%2060400> Mobile. +47 47419869
>> <tel:%2B47%2047419869>
>> _______________________________________________
>> Powered by www.kitware.com <http://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
>>
>>
>>
>>
>> --
>> Jothy
>>
>
--
Dr. Jonas Juselius <jonas.juselius at uit.no>
High Performance Computing Group, University of Tromsø
Tel. +47 776 60400 Mobile. +47 47419869
More information about the vtkusers
mailing list