[vtkusers] Multiple view of the same object
David Doria
daviddoria at gmail.com
Fri Mar 4 07:24:16 EST 2011
On Fri, Mar 4, 2011 at 4:48 AM, nsarrasin <nsarrasin at phenix-systems.com> wrote:
> Hi all,
>
> I would like to display a vtkPolyData in three different views (XY, XZ & YZ
> at the beginning) and update them each time one is modified.
>
> I've looked toward "VTK/Examples/Cxx/Visualization/MultipleViewports" but I
> can't display the same sphere in the fourth viewports.
>
> Hope to be clear.
> Thanks by advance.
>
> Nicolas
To make them all move together, you have to "share" the camera. That
is, create a camera:
vtkSmartPointer<vtkCamera> camera =
vtkSmartPointer<vtkCamera>::New();
camera->SetPosition(0, 0, 20);
camera->SetFocalPoint(0, 0, 0);
and set all of the renderers to use it:
// Create a renderer, render window, and interactor
vtkSmartPointer<vtkRenderer> renderer =
vtkSmartPointer<vtkRenderer>::New();
renderer->SetActiveCamera(camera);
David
More information about the vtkusers
mailing list