[vtkusers] how to pick vtkXYPlotActor points
Ashley Sher
tany0029 at ntu.edu.sg
Thu Apr 20 23:53:35 EDT 2006
you'll be using vtkPointPicker?
If so, hope this will help.
//usual render stuffs
vtkRenderer *ren = vtkRenderer::New();
vtkRenderWindow *renWin = vtkRenderWindow::New();
vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
iren->SetRenderWindow (renWin);
//create using vtkXYPlotActors
:
:
//create a marker for the pick
vtkSphereSource *sphere = vtkSphereSource::New();
vtkPolyDataMapper *sphereMapper = vtkPolyDataMapper::New();
sphereMapper->SetInput(sphere->GetOutput());
vtkActor *sphereActor = vtkActor::New();
sphereActor->SetMapper(sphereMapper);
sphereActor->PickableOff();
ren->AddActor(sphereActor);
//callback command
LeftClickCallback *callback = LeftClickCallback::New();
callback->SetRenderer(ren);
callback->SetSelectionActor(textActor);
iren->AddObserver (vtkCommand::CharEvent, callback, 0);
iren->ReInitialize();
iren->Start ();
vtkCamera *cam = ren->GetActiveCamera();
renWin->Render();
--
View this message in context: http://www.nabble.com/how-to-pick-vtkXYPlotActor-points-t1484115.html#a4019979
Sent from the VTK - Users forum at Nabble.com.
More information about the vtkusers
mailing list