[vtkusers] Determining vtkActors from point in space
David E DeMarle
dave.demarle at kitware.com
Tue Mar 30 17:17:11 EDT 2010
Make a vtkPicker instead of the Abstract class, then call the
vtkPicker::GeActors() to get a list of all the actors that are
underneath the pixel.
David E DeMarle
Kitware, Inc.
R&D Engineer
28 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-371-3971 x109
On Tue, Mar 30, 2010 at 5:11 PM, Robbie Banks <robbie.banks at gmail.com> wrote:
> Sorry for being a bit slow, but how do I get the actor?
>
> Is it.
>
> vtkSmartPointer<vtkAbstractPropPicker> pPicker =
> vtkSmartPointer<vtkAbstractPropPicker>::New();
> pPicker->pick(xloc,yloc,zloc,pRenderer);
> vtkSmartPointer<vtkActor> pPickedActor = pPicker->GetActor();
>
> Robbie
>
> -----Original Message-----
> From: David E DeMarle [mailto:dave.demarle at kitware.com]
> Sent: Tuesday, March 30, 2010 1:57 PM
> To: Robbie Banks
> Cc: vtkusers at vtk.org
> Subject: Re: [vtkusers] Determining vtkActors from point in space
>
> See the Picker classes.
>
> http://www.vtk.org/doc/nightly/html/classvtkAbstractPropPicker.html
>
> David E DeMarle
> Kitware, Inc.
> R&D Engineer
> 28 Corporate Drive
> Clifton Park, NY 12065-8662
> Phone: 518-371-3971 x109
>
>
>
> On Tue, Mar 30, 2010 at 4:38 PM, Robbie Banks <robbie.banks at gmail.com>
> wrote:
>> Hi all,
>>
>> Is there an easy way to determine the vtkActor that intersects with a
> given
>> point in space?
>>
>> i.e. I have the x,y,z location on the renderer that I am interested in and
> I
>> want to find out which vtkActor this point is in.
>>
>> Regards
>> Robbie
>>
>> _______________________________________________
>> Powered by www.kitware.com
>>
>> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>>
>> Please keep messages on-topic and check the VTK 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