[vtkusers] Wrong coordinate system for bounds computation in vtkClipPlanesPainter

Xabi Riobe xabivtk at gmail.com
Wed Feb 26 04:57:51 EST 2014


Hello,

I would want to discuss about the issue reported here:
http://vtk.org/Bug/view.php?id=11949

The vtkClipPlanesPainter::UpdateBounds method is incorrect, but should it
be removed or fixed if possible?

the documentation for vtkPainter says:
" Expand or shrink the estimated bounds of the object based on
the geometric transformations performed in the painter. If the painter does
not modify the geometry, the bounds are passed through. "

Since we are talking about the painter, i understand that the geometry
referred here is the one of the data representation, not the data itself.
And in that case, it is modified if clipped by the planes (in
vtkOpenGLClipPlanesPainter),
so the bounds should be updated.

But for that we need the actor's matrix, which is not accessible in the
method UpdateBounds.

And the initial problem is that the vtkRenderer::ResetCamera method should
take into consideration the clipped bounds in order to recenter about the
visible geometry.

Any ideas or comments about that?


2013-05-06 17:31 GMT+02:00 xabivtk <xabivtk at gmail.com>:

> Hi,
>
> For the 5.10 release, the method vtkClipPlanesPainter::UpdateBounds has
> been
> implemented to fix a bug, but i think that there is a transformation
> missing
> for the planes, leading to the incorrect culling of some props in the case
> they have a transformation matrix different than identity.
>
> this->ClippingPlanes are expressed in world coordinates, after the use of
> the actor's matrix, whereas the bounds are in data coordinates
>
> To clip the data, the planes are used in
> vtkOpenGLClipPlanesPainter::RenderInternal to be passed to glClipPlane
> after
> beeing transformed from world to data coords with the use of the actor's
> matrix.
> But in the rendering pipeline we have a call to
> vtkClipPlanesPainter::UpdateBounds where these planes are considered to be
> in the data coordinates.
>
> Here is the calling stack:
>
> vtkClipPlanesPainter::UpdateBounds              ===> original data bounds,
> but actor's world coordinates transformed planes
> vtkPainterPolyDataMapper::ComputeBounds
> vtkPolyDataMapper::GetBounds
> vtkActor::GetBounds                                  ===> actor's
> transformation Matrix applied to the bounds
> vtkFrustumCoverageCuller::Cull                    ===> Prop can be
> incorrectly culled !!!!
>
> So in the method vtkClipPlanesPainter::UpdateBounds, the planes should be
> transformed with the actor's matrix before changing the bounds.
>
>
> I used to fill a report in the Mantis Bug Tracker for this kind of bug, but
> it seems that vtk has been removed from it...
>
>
>
> --
> View this message in context:
> http://vtk.1045678.n5.nabble.com/Wrong-coordinate-system-for-bounds-computation-in-vtkClipPlanesPainter-tp5720585.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> 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
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140226/0bc58c03/attachment.html>


More information about the vtkusers mailing list