[vtkusers] Re: SetClippingPlanes() vs. SetClippingPlanes()

Lisa Avila lisa.avila at kitware.com
Fri Sep 15 13:47:24 EDT 2006


Hi David,

Just watch out - I expect this to break a test or two because we 
probably rely on the fact that a copy is made. That is, I suspect there 
is a test or two where we create a plane, add it as a clip plane, change 
the values, add that plane, etc.

Lisa



David Gobbi wrote:
> 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