[vtkusers] Re: SetClippingPlanes() vs. SetClippingPlanes()
David Gobbi
dgobbi at atamai.com
Fri Sep 15 13:55:53 EDT 2006
Thanks for the warning. I'll check the VTK tests carefully. I hope
that nothing in ParaView or the other projects relies on the copy mechanism.
Lisa Avila wrote:
> 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
>>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages
> on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
More information about the vtkusers
mailing list