[vtkusers] Displaying graphs side by side

Eric E. Monson emonson at cs.duke.edu
Tue Aug 17 14:38:48 EDT 2010


Well, it seems to basically work in Python (just directly translating your code) -- at least it doesn't crash. The only strange thing is that selections don't work on the first (left) graph. All of the other interactions work, and the rubber band is drawn correctly, but nothing gets selected unless you're working on the right graph...

Just a note: I don't think you don't need to set the Points on the graphs since vtkGraphLayoutView includes the "layout", which sets the points. If you want to "disable" the layout and just set the points manually, you should probably use SetLayoutStrategyToPassThrough() on the view.

-Eric


On Aug 17, 2010, at 2:19 PM, David Doria wrote:

> On Tue, Aug 17, 2010 at 2:05 PM, Eric E. Monson <emonson at cs.duke.edu> wrote:
>> I really think you'll need to create two vtkGraphLayoutView instances, and try to replace their render windows with your own single one, and grab their renderers and set their viewports (and even then it might now work).
>> 
>> -Eric
> 
> Hmm getting very close...
> 
> I also had to create an interactor and use
> vtkGraphLayoutView::SetInteractor (or you'd have to call
> GetInteractor()->Start() twice, which didn't make sense)
> 
> The latest attempt is here:
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/Graphs/SideBySideGraphs
> 
> it looks like it actually displays the graphs correctly, but it
> crashes right away.
> 
> Thoughts?
> 
> Thanks,
> 
> David




More information about the vtkusers mailing list