Some thoughts regarding the same camera on different viewpoints issue:<br><br>You may consider using vtkObservers in a custom interactor<br><br>assume a vtkCollection RendererCollection with renderers as items in your custom interactor vtkMyInteractor class
<br>the CurrentRenderer is the renderer to follow.<br><br>In the constructor of the vtkMyInteractor we add:<br><br>this->MoveCallback= vtkCallbackCommand::New();<br>
this->MoveCallback->SetClientData(this); <br>
this->MoveCallback->SetCallback(vtkMyInteractor::UpdateCamera);<br><br><br>we must add the callback in the section where the interactor becomes enabled.<br>this->AddObserver(vtkCommand::AnyEvent, this->MoveCallback,
0.0);<br><br>We also must have a static function to call:<br><br><span style="font-weight: bold;">static </span>void vtkMyInteractor::UpdateCamera(vtkObject* vtkNotUsed(object), <br> unsigned long event,
<br> void* clientdata, <br> void* vtkNotUsed(calldata))<br>{<br> vtkMyInteractor* self = reinterpret_cast<vtkMyInteractor*>( clientdata );<br> self->AdjustCameras();
<br>}<br><br>Finally the real code goes here:<br><br><span style="font-weight: bold;"></span>void vtkMyInteractor::AdjustCameras()<br>{<br> for (int i = 0; i < RendererCollection->GetNumberOfItems(); i++)<br> {
<br> vtkRenderer *rn = (vtkRenderer *) RendererCollection->GetItemAsObject(i);<br> rn->GetActiveCamera()->SetPosition(this->CurrentRenderer->GetPosition());<br> ... SetFocalPoint...etc<br>
}<br>}<br><br>The above will tell the interactor to adjust the other cameras according to its main renderer camera.<br>You may also set some cameras to act without zoom or rotation in the AdjustCameras function<br><br>
You must remove the observer when the interactor is disabled and/or in the destructor and have in mind that <br>the renderers in the RendererCollection must be destroyed AFTER this interactor is destroyed/disabled otherwise
<br>crashes will occur.<br><br>I hope this will help<br><br>