[vtkusers] Picking in MFC?

zfjgo zfjgo at 126.com
Fri Nov 12 01:37:17 EST 2004


I try to implement vtkRenderWindowInteractor into a dialog-based
MFC-Application. I don't use the Win32-Interactor! Unfortunately I don't
find the right decleration for iren->SetEndPickMethod(????).
In a DOS-based application I used:

static void PickCells(void *)

void main(void)
{
vtkPointPicker *picker = vtkPointPicker::New();
    picker->SetTolerance(0.01);

  vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
    iren->SetRenderWindow(renWin);
    iren->SetPicker(picker);

iren->SetEndPickMethod(PickCells,(void *)iren);
  iren->Start();
}

static void PickCells(void *arg)
{
  vtkRenderWindowInteractor *iren = (vtkRenderWindowInteractor *)arg;
  vtkPointPicker *picker = (vtkPointPicker *)iren->GetPicker();
  ....
}

This works fine for DOS-bases application, unfortunately the decleration
isn't the same for windows-based applications? Any example code or
suggestions, how to get this work?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20041112/b475bf73/attachment.htm>


More information about the vtkusers mailing list