[vtkusers] Bug with vtkPropPicker and overlapping renderers
Jothybasu Selvaraj
jothybasu at gmail.com
Mon Apr 30 12:12:29 EDT 2012
Try adding
renWin->SetNumberOflayers(2)
before adding renderers to renWin.
Jothy
On Mon, Apr 30, 2012 at 5:06 PM, Simon Drouin <drouin.simon at gmail.com>wrote:
> Trying to get the pick position from the first of 2 overlapping renderers
> doesn't work. Here is an example:
>
> vtkRenderer * ren0 = vtkRenderer::New();
> ren0->SetLayer( 0 );
> vtkRenderer * ren1 = vtkRenderer::New();
> ren1->SetLayer( 1 );
>
> vtkRenderWindow * win = vtkRenderWindow::New();
> win->AddRenderer( ren0 );
> win->AddRenderer( ren1 );
>
> ......
>
> vtkPropPicker * picker = vtkPropPicker::New();
> picker->Pick( x, y, z, ren0 );
> double pos[3];
> picker->GetPickPosition( pos );
>
> Here, pos will be wrong. The reason seems to be that GetPickPosition()
> relies on the content of the z buffer, but the z buffer generated by the
> first renderer is being cleared when the second renderer gets rendered.
>
> Anybody has a workaround for that?
>
> s.
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
--
Jothy
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120430/6302f642/attachment.htm>
More information about the vtkusers
mailing list