- I have 2 renderers, gridRenderer and geoRenderer, within 2 layers of a render window:
gridRenderer->SetLayer(0); geoRenderer->SetLayer(1); RenderWindow()->SetNumberOfLayers(2); RenderWindow()->AddRenderer(geoRenderer); RenderWindow()->AddRenderer(geoRenderer);
- I then connect their interactor by setting both of their active cameras to the same one:
This successfully allows me to have a grid in the background, with a geometry in the foreground.
- The camera’s plane clipping is only focused on the geoRenderer, causing the much larger gridRenderer’s actor to be clipped out.
The difference between my issue and this one is that I am updating both the gridRender’s and geoRenderer’s actors, sometimes removing all of the actors within a renderer entirely (empty renderer could mess up the clipping planes, not rendering anything, if the camera chooses it as the active renderer).
My assumption is that VTK is confused as to which renderer to use in order to set the shared camera’s clipping planes. I tried using
vtkRenderer::ResetCameraClippingRange()on both of the renderer’s but cannot get the clipping planes to form properly
Is there someway I can tell VTK which renderer to look at when resetting the clipping planes/camera?