[vtkusers] Is it possible to keep the original Ids for picking after vtkClipPolyData?
Hong Yi
hongyi at renci.org
Fri Apr 29 17:16:56 EDT 2011
Hi David,
Many thanks for the pointer. I have replaced vtkClipPolyData with vtkMapper::AddClippingPlane and picking and highlighting are working now as expected. However, I'd like to achieve the same clipping functionality as "InsideOutOn" in vtkClipPolyData. Is there an equivalent property such as "InsideOutOn" in vtkMapper when a clipping plane is added? I know I can probably invert clipping plane normal to achieve this, but thought there might be a nicer way to achieve this.
I will work on a small sample of code that demonstrates the id change problem in vtkClipPolyData and post the sample code to the list.
Thanks again,
Hong
-----Original Message-----
From: David Gobbi [mailto:david.gobbi at gmail.com]
Sent: Friday, April 29, 2011 4:41 PM
To: Hong Yi
Cc: VTK Users
Subject: Re: [vtkusers] Is it possible to keep the original Ids for picking after vtkClipPolyData?
Hi Hong,
You can avoid this problem by using the mapper to clip the data, via the vtkMapper::AddClippingPlane() method, instead of using vtkClipPolyData.
- David
On Fri, Apr 29, 2011 at 2:33 PM, Hong Yi <hongyi at renci.org> wrote:
> Hello,
>
>
>
> I am using vtkClipPolyData to clip polydata geometry in combination
> with vtkImplicitPlaneWidget2. It works well but apparently after
> clipping, the original Ids corresponding to each point (in my case, an
> atom) in polydata geometry is recomputed. Since I am using the
> original Ids for picking and highlighting the corresponding residues
> in another view window, after clipping, the picking and highlighting
> does not pick the right atom and residue because the Ids are changed
> after clipping. Is there a way to keep the original Ids after clipping?
>
>
>
> Thanks for any pointers on this,
>
>
>
> Hong
More information about the vtkusers
mailing list