[vtkusers] Turning off the auto highlighting on picked objects

Steven Chall stevec at renci.org
Wed Aug 24 09:46:48 EDT 2011

Thanks for your suggestions.  I tried calling InitializePickList, which seems like it should clean things up: however,  it didn't make the unwanted bounding box disappear.  The Initialize() method is protected, so I'd have to subclass vtkPicker to be able to access it externally.  Not a big deal, but your idea inspired me to go one further and actually delete the vtkPicker object and recreate it when I want to get rid of its appurtenances.  That still doesn't do it.  It seems that somewhere in the process vtkPicker or some associated object spawns off an autonomous bounding box that hangs around even when vtkPicker goes away (or does it necessarily actually go away when I call Delete() on it?).  Maybe some other object exerts control over it that  I haven't tracked down yet.  Thanks again for the ideas.


From: Eric E. Monson [mailto:emonson at cs.duke.edu]
Sent: Tuesday, August 23, 2011 3:08 PM
To: Steven Chall
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Turning off the auto highlighting on picked objects

Hey Steve,

I probably shouldn't be stepping in here since I don't use picking that often, but... So, it sounds like you're not populating a vtkSelection with your results, so you may want to try calling Initialize() on your picker, which clears out its list of actors and prop3ds. Otherwise, vtkAbstractPicker has an InitializePickList(), which clears out its vtkPropCollection...

Talk to you later,

On Aug 23, 2011, at 1:42 PM, Steven Chall wrote:

Hi fellow VTK enthusiasts,
I have what is in essence a 3D graph of vtkCubeSource objects from which I select one at a time, sometimes using the standard vtkPicker approach, sometimes using other mechanisms I've coded myself.  Whichever mechanism I use to do the picking, I've also coded how I visually highlight/indicate what's been selected; thus, the red wireframe box that the vtkPicker approach leaves around the picked object is at best irrelevant.  However, if I follow a vtkPicker-based pick A with a non-vtkPicker-based pick B, that red wireframe box remains around picked object A, even though by the internal logic of my application it's no longer picked.

That the vtkPicker object  thinks it's still picked doesn't matter to me - I track picking independently of that - but I can't figure out how to remove that red wireframe box that is a consequence of the vtkPicker's "picked" state.   I'd imagine it's just a wireframe vtkCubeSource or the like and that it would have something to do with the vtkPicker's vtkActor's vtkProperty's bounds (as in picker->GetActor()->GetProperty->GetBounds(bounds), where bounds is an array of 6 floats and picker is a vtkPicker *), but snooping around in the source code hasn't gotten me to find where that red bounding box is drawn.   Any suggestions on how I can turn it off and just generally access it?  Thanks.


-Steve Chall
 Senior Research Software Developer
 Renaissance Computing Institute (RENCI)
 Phone: 919-681-9639
 Email: stevec at renci.org<mailto:stevec at renci.org>

Powered by www.kitware.com<http://www.kitware.com>

Visit other Kitware open-source projects athttp://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:

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20110824/5aa80b6b/attachment.htm>

More information about the vtkusers mailing list