[vtkusers] problem with vtkPicker

Audrius Stundzia adv_biologic at hotmail.com
Fri Dec 15 12:57:09 EST 2000


Hi Steve,

I just went through exactly the same problem last night after downloading 
the latest nightly release. Great minds think alike :)

I used the example in vtk/graphics/examplesCxx/pickCells.cxx
as my guide.

In this new release one has to switch to an explicit vtkPointPicker
(or vtkCellPicker, presumably, but I haven't used this).

vtkPointPicker *pointPicker = (vtkPointPicker *) iren->GetPicker();

This did the trick for me. Hope this helps.

Regards,

Audrius



>From: Steve Woolsey <woolsr at inel.gov>
>To: VTK Users <vtkusers at public.kitware.com>
>Subject: [vtkusers] problem with vtkPicker
>Date: Fri, 15 Dec 2000 10:12:08 -0700
>
>I am having a problem with setting up my vtkPicker.
>
>in my code I do the following:
>
>	// Globals
>	vtkRenderWindowInteractor *iren;
>	vtkPicker   *main_picker;
>
>	// Init function
>	void InitInteractors()
>	{
>		iren = (vtkRenderWindowInteractor*)vtkRenderWindowInteractor::New();
>		iren->SetRenderWindow(renWin);
>		iren->Initialize();
>
>		main_picker = iren->GetPicker();
>	}
>
>Later in the program I use the GetActor method.
>
>When I compile I get the following error:
>
>	type 'vtkPicker' is not a base type for type 'vtkAbstractPicker'
>
>This is for the line with the GetPicker call.  If I change the
>declaration of main_picker to type vtkAbstractPicker, then I get an
>error saying:
>
>no matching function call to 'vtkAbstractPicker::GetActor()'
>
>This used to compile just fine with vtk 3.1.
>I just went to the nightly build, because of speed issues.  What can I
>do to fix this?
>
>-- Steve
>-------------------------------------------------------------------
>Steven Woolsey                         Engineer/Scientist
>Bechtel BWXT Idaho, LLC                Visualization Engineer
>Idaho National Engineering Lab.        EMAIL: woolsr at inel.gov
>P.O. Box 1625, M.S. 3605
>Idaho Falls, ID  83415-3605
>-------------------------------------------------------------------
>
>_______________________________________________
>This is the private VTK discussion list.
>Please keep messages on-topic. Check the FAQ at: 
><http://public.kitware.com/cgi-bin/vtkfaq>
>Follow this link to subscribe/unsubscribe:
>http://public.kitware.com/mailman/listinfo/vtkusers

_________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com.





More information about the vtkusers mailing list