<div dir="ltr">Hello,<div><br><div>I would want to discuss about the issue reported here:</div></div><div><a href="http://vtk.org/Bug/view.php?id=11949">http://vtk.org/Bug/view.php?id=11949</a><br></div><div><br></div><div>
The <span style="font-size:13px;font-family:arial,sans-serif">vtkClipPlanesPainter::</span><span style="font-size:13px;font-family:arial,sans-serif">UpdateBounds method is incorrect, but should it be removed or fixed if possible?</span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif"><br></span></div><div><span style="font-size:13px;font-family:arial,sans-serif">the documentation for vtk</span><span style="font-family:arial,sans-serif;font-size:13px">Painter </span><span style="font-family:arial,sans-serif;font-size:13px">says:</span></div>
<div><span style="font-size:13px;font-family:arial,sans-serif">" </span><font face="arial, sans-serif">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. </font><span style="font-family:arial,sans-serif;font-size:13px">"</span></div>
<div><span style="font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="font-family:arial,sans-serif;font-size:13px">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 </span><font face="arial, sans-serif">vtkOpenGLClipPlanesPainter), so the bounds should be updated.</font></div>
<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">But for that we need the actor's matrix, which is not accessible in the method UpdateBounds.</font></div><div><font face="arial, sans-serif"><br>
</font></div><div><font face="arial, sans-serif">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.</font></div>
<div><br></div><div><font face="arial, sans-serif">Any ideas or comments about that?</font></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">2013-05-06 17:31 GMT+02:00 xabivtk <span dir="ltr"><<a href="mailto:xabivtk@gmail.com" target="_blank">xabivtk@gmail.com</a>></span>:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
For the 5.10 release, the method vtkClipPlanesPainter::UpdateBounds has been<br>
implemented to fix a bug, but i think that there is a transformation missing<br>
for the planes, leading to the incorrect culling of some props in the case<br>
they have a transformation matrix different than identity.<br>
<br>
this->ClippingPlanes are expressed in world coordinates, after the use of<br>
the actor's matrix, whereas the bounds are in data coordinates<br>
<br>
To clip the data, the planes are used in<br>
vtkOpenGLClipPlanesPainter::RenderInternal to be passed to glClipPlane after<br>
beeing transformed from world to data coords with the use of the actor's<br>
matrix.<br>
But in the rendering pipeline we have a call to<br>
vtkClipPlanesPainter::UpdateBounds where these planes are considered to be<br>
in the data coordinates.<br>
<br>
Here is the calling stack:<br>
<br>
vtkClipPlanesPainter::UpdateBounds ===> original data bounds,<br>
but actor's world coordinates transformed planes<br>
vtkPainterPolyDataMapper::ComputeBounds<br>
vtkPolyDataMapper::GetBounds<br>
vtkActor::GetBounds ===> actor's<br>
transformation Matrix applied to the bounds<br>
vtkFrustumCoverageCuller::Cull ===> Prop can be<br>
incorrectly culled !!!!<br>
<br>
So in the method vtkClipPlanesPainter::UpdateBounds, the planes should be<br>
transformed with the actor's matrix before changing the bounds.<br>
<br>
<br>
I used to fill a report in the Mantis Bug Tracker for this kind of bug, but<br>
it seems that vtk has been removed from it...<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Wrong-coordinate-system-for-bounds-computation-in-vtkClipPlanesPainter-tp5720585.html" target="_blank">http://vtk.1045678.n5.nabble.com/Wrong-coordinate-system-for-bounds-computation-in-vtkClipPlanesPainter-tp5720585.html</a><br>
Sent from the VTK - Users mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div><br></div>