[vtkusers] Re: mousepicking

Goodwin Lawlor goodwin.lawlor at ucd.ie
Sun Apr 17 19:02:14 EDT 2005


Hi Verena,

Have a look at this wiki page: http://www.vtk.org/Wiki/VTK_Mouse_Picking

hth

Goodwin

"verena kinder" <verena.kinder at web.de> wrote in message
news:461136285 at web.de...
> Hello!
> I try to make my render window reacts on mouse picking!
> I thougt it would run that way, but it doesn't work:
>
> class vtkPicking: public vtkCommand
> {
> public:
>   static vtkPicking *New(){ return new vtkPicking; };
>   virtual void Execute(vtkObject * caller, unsigned long, void*){
> //Just for testing
>   cout<<"You are Picking"<<endl;}
>   };
>
> int main (int argc, char **argv)
> {
> vtkRenderer *aRenderer = vtkRenderer::New();
> vtkRenderWindow *renWin = vtkRenderWindow::New();
> vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
>
> aRenderer->SetBackground(1.0,0.0,0.0);
> renWin->AddRenderer(aRenderer);
> iren->SetRenderWindow(renWin);
>
> renWin->Render();
>
> ....
>
> vtkCellPicker *picker=vtkCellPicker:: New();
> vtkPicking *b=vtkPicking ::New();
> iren->SetPicker(picker);
> iren->AddObserver(vtkCommand::EndPickEvent,b);
> iren->Initialize();
> iren->Start();
> .............
>
> }
>
> Anbody an idea?
>
> Thanks
> verena
>
> ______________________________________________________________
> Verschicken Sie romantische, coole und witzige Bilder per SMS!
> Jetzt bei WEB.DE FreeMail: http://f.web.de/?mc=021193
>
> _______________________________________________
> 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