[vtkusers] which classes can use "AddObserver" work in addition to vtkInteractorObserver and its subclasses

Phoenix Chen cih3239 at gmail.com
Tue Oct 18 20:43:39 EDT 2011


the AddObserver is member function of vtkObject, however when I try to do:

spherePickTestActor->AddObserver(vtkCommand::RightButtonPressEvent,interactorCallBack);
spherePickTestActor->AddObserver(vtkCommand::RightButtonReleaseEvent,
interactorCallBack);

it does not work, I can only make callback of "vtkRenderWindowInteractor"
and "vtkInteractorObserver and its subclasses" successfully worked,
something like:

renWinInteractor->AddObserver(vtkCommand::RightButtonPressEvent,
interactorCallBack);

is it the nature of the design or did I do anything wrong?  Please help and
thanks a lot!


Truly,


Phoenix
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111019/562f3afd/attachment.htm>


More information about the vtkusers mailing list