[vtkusers] displaying multiple unstructured grids in one render window
Prashanth Dumpuri
prashanth.dumpuri at vanderbilt.edu
Fri Mar 11 19:18:06 EST 2005
All,
(sorry for the long post)
I'm working on a tool wherein I want to be able to display multiple
unstructured grids in one render window.
Here's a pseudo-algorithm of what i want to do
read in an unstructured grid.
for i = 1:number of transformations
rotate/transform the unstructured grid
display the unstructured grid
end
The number of transformations and the rotation angles are user inputs.
Given the number of transformations, i want my code to display all
unstructured grids in one screen without any user interaction.
Splitting the renderer based on the number of transformations(using
SetViewport) and displaying each unstructured grid in one viewport is an
option that I have looked into (so if the number of transformations were
4, i would be splitting the renderer into 4 plots and and displaying
each of the 4 unstructured grids in those 4 plots/divisions). Here's the
pseudo-code I have written so far:
instantiate the vtkRenderWindow and vtkRenderWindowInteractor outside
the main
int main()
{
get the number of transformations and the rotation angles from the
user
read in the unstructured grid
for i = 1 : number of transformations
rotate/transform the unstructured grid
create an actor based on this unstructured grid
create a renderer and add the above actor
set the viewport dimensions based on the number of transformations
add the renderer to the renderwindow
render
end for 'i'
}
For some reason, i have to hit 'q' or 'e' to display each unstructured
grid in the loop. If the number of transformations exceed 10, then the
unstructured grids appear too small (no matter what the camera zoom is)
and also it is not an easy job to specify the min and max for every
viewport. I wanna avoid saving every unstructured grid.
'am clueless on what to do.Any help in this will be greatly
appreciated.
Thanks,
Prashanth
(prashanth.dumpuri at vanderbilt.edu)
More information about the vtkusers
mailing list