[vtkusers] Snycing interactors: interactor styles

Gerrick Bivins gbivins at objectreservoir.com
Thu Oct 8 13:19:29 EDT 2009


Thanks for the reply.
I was able to do it by:
1) Adding mouseinteractionevent for each interactor
2) in the interactorevent, get the current interactors camera
3) update the cameras of the other interactors
4) update light and clipping range on the other cameras
5) call OnMouseMove() of the selected camera.

Probably not that elegant but I wanted to get going on it.

Thanks for the input.
Gerrick
On Oct 8, 2009, at 12:12 PM, S, Navneeth (GE, Research) wrote:

> Hi Gerrick,
>
> I think you have 2 options for syncing interactors:
>
> 1. The rather obvious one is to have 2 viewports in the same window  
> that
> share an interactor.
> But since your application has 2 windows by design. I guess this is
> ruled out.
>
> 2. The other option is to create a tree/graph datastructure wherein  
> you
> maintain the parent-child relationship of the windows. Subsequently  
> you
> will need to have a callback that intercepts the Update events of the
> renderer. You will then have to iterate through all the "children" of
> the window and update their interactors to reflect the events in the
> "parent".
>
> This is off the top of my head. Pl dig into the redraw mechanism of  
> the
> interactor to verify this suggestion.
>
> -navneeth
>
>> -----Original Message-----
>> From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On
> Behalf Of vtkusers-request at vtk.org
>> Sent: Wednesday, October 07, 2009 9:31 PM
>> To: vtkusers at vtk.org
>
>
>> ------------------------------
>
>> Message: 4
>> Date: Tue, 6 Oct 2009 14:02:32 -0500
>> From: Gerrick Bivins <gbivins at objectreservoir.com>
>> Subject: [vtkusers] Snycing interactors: interactor styles
>> To: vtkusers <vtkusers at vtk.org>
>> Message-ID: <8377B9FA-FEEF-49C4-89DE- 
>> B52049387DAD at objectreservoir.com>
>> Content-Type: text/plain; charset=us-ascii; format=flowed; delsp=yes
>
>> Hello all,
>> I have an application with 2 separate windows. I'd like to be able to
>> use an interactor style for each of the windows that will be "synced"
>> so that if one view changes the other view changes at the same time.
>> I thought I could use the same interactor style on the separate
>> windows but only the last one that the interactor style is set on
>> reacts to mouse movements.
>> I couldn't find any examples or info on this so I thought I'd ask the
>> community,
>> Thanks for any input
>> Gerrick
>
>
>





More information about the vtkusers mailing list