[vtkusers] mousepicking
verena kinder
verena.kinder at web.de
Sun Apr 17 17:27:58 EDT 2005
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
More information about the vtkusers
mailing list