[vtkusers] How to Add multiple AddObserver in C++/Windows ?
Mathieu Malaterre
Mathieu.Malaterre at creatis.insa-lyon.fr
Thu Sep 18 05:00:08 EDT 2003
> 1) Data conversion - strict type checking does not allow C++ code to compile.
> ( Posted twice )
Sorry I don't understand ? Could you give us an example ?
> 2) How to add multiple AddObserver function.
> TCL example ImageInteractor.tcl uses 3 events as below.. How to add it
> properly.
>
> interactor->AddObserver(vtkCommand::LeftButtonPressEvent, startZoom);
> interactor->AddObserver(vtkCommand::MouseMoveEvent, startZoom::MouseMove);
> interactor->AddObserver(vtkCommand::LeftButtonReleaseEvent, EndZoom);
>
> Currently, I have done by creating class as below
> class vtkMyCallback : public vtkCommand and having one callback with name
> of Execute() : As done in Cone6.cxx example.
>
> Is this right?
> What is best way to do it?
'best' I don't know, however have a look at:
http://public.kitware.com/cgi-bin/cvsweb.cgi/ParaView/ParaView/vtkPV3DWidget.cxx?cvsroot=ParaView
Look for 'vtkPV3DWidgetObserver'
> 3) I have one observation, while we create default window interactor in Window/OpenGL
> then Zoom, Image movement and rotation events are little abrupt. There seems
> to be no proper control by user. Either you end up making it too big or move
> out of scence.
> What is problem here ??
>
Press 't' for trackball ... (default mode is 'j' joystick)
> Thanks & Regards
HTH
mathieu
More information about the vtkusers
mailing list