[vtkusers] Background layer not displayed entirely

Mwoua david.levy at leddartech.com
Mon Mar 27 16:03:59 EDT 2017


Hello,

I have two renderers in the same renderer window, I have synchronized the
camera, but, when im moving the camera it only displays the area around the
points from the front layer. I have a black border on top and bottom of the
window (see image)

<http://vtk.1045678.n5.nabble.com/file/n5742633/blackborders.png> 

If all my displayed items are in the same renderer everything is fine.

Is there a way to force the clipping range to take into account the other
renderer? (before I manually reset the clipping range)



My (simplified code) :
    //Set up the QVTK window
    vtkSmartPointer<vtkRenderer> lRend1 =
vtkSmartPointer<vtkRenderer>::New(); //background renderer
    mVTKWidget->GetRenderWindow()->AddRenderer( lRend1 ); 
    vtkSmartPointer<vtkRenderer> lRend2 =
vtkSmartPointer<vtkRenderer>::New();
    lRend2->SetLayer(1);
    mVTKWidget->GetRenderWindow()->AddRenderer( lRend2 );
    mVTKWidget->GetRenderWindow()->SetNumberOfLayers(2);
    lRend2->SetActiveCamera( lRend1->GetActiveCamera() );
    mVTKWidget->update();


   //Build my data and add actors to the corresponding renderer
   ....

    lBackGroundRenderer->ResetCameraClippingRange();
    mVTKWidget->update();



--
View this message in context: http://vtk.1045678.n5.nabble.com/Background-layer-not-displayed-entirely-tp5742633.html
Sent from the VTK - Users mailing list archive at Nabble.com.


More information about the vtkusers mailing list