Quantcast

Background layer not displayed entirely

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Background layer not displayed entirely

Mwoua
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)



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();
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Background layer not displayed entirely

Mwoua
I was looking at the wrong place, so if anyone is looking for that information the required function is AutoAdjustCameraClippingRangeOff () from the interactor style.
Loading...