[vtkusers] Wrong coordinate system for bounds computation in vtkClipPlanesPainter
xabivtk
xabivtk at gmail.com
Mon May 6 11:31:03 EDT 2013
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.
More information about the vtkusers
mailing list