[vtkusers] SetClippingPlanes() vs. SetClippingPlanes()

David Gobbi dgobbi at atamai.com
Fri Sep 15 13:16:29 EDT 2006


Hi Dean, Lisa,

I hope you don't mind if I revive and old thread:
http://public.kitware.com/pipermail/vtkusers/2004-May/074167.html

The vtkAbstractMapper has two SetClippingPlanes() methods.  One
takes a vtkPlaneCollection, the other takes a vtkPlanes implicit function.

The method SetClippingPlanes(vtkPlanes *planes) does not work as
expected.  It makes an internal copy of the planes instead of storing
a pointer to vtkPlanes object.  So, if you get a vtkPlanes from a
vtkBoxWidget, and set them to the mapper, the mapper doesn't
update when the user interacts with the BoxWidget.

I would like to fix this, if nobody objects.  It should be as simple as
storing a pointer to the vtkPlanes in a vtkAbstractMapper ivar
and checking the modified time of the vtkPlanes each time the
mapper updates.  I know that this will mean that the mapper will
store both a vtkPlaneCollection and a vtkPlanes, but there are ways
to deal with that.

 - David



More information about the vtkusers mailing list