vtk 3.1: vtkInteractorStyleUser callbacks

Audrius Stundzia adv_biologic at hotmail.com
Fri Feb 25 11:31:27 EST 2000


Dear vtker's

Thanks to everyone who replied regarding my question on vtkInteractorStyle.

(Btw, what is vtkTypeMacro and why whould/should I want to use it?)

I'm now trying to use the subclass vtkInteractorStyleUser to
set up several callbacks. However, the callbacks aren't calling
back.

Here's a code fragment:

myCellPicker= vtkCellPicker::New(); // Used in GetScalarCallback
myCellPicker->SetTolerance( 0.001);

myInteractor = vtkXRenderWindowInteractor::New();
myInteractor->SetPicker( myCellPicker);

myInteractorStyleUser = vtkInteractorStyleUser::New();
myInteractorStyleUser->SetInteractor( myInteractor) ;

myInteractorStyleUser->SetLeftButtonPressMethod
                       ( GetScalarCallback
                       , (void *) myInteractorStyleUser );
myInteractorStyleUser->SetLeftButtonReleaseMethod
                       ( NullCallback
                       , (void *) myInteractorStyleUser );
myInteractorStyleUser->SetMiddleButtonPressMethod
                       ( NullCallback
                       , (void *) myInteractorStyleUser );
myInteractorStyleUser->SetMiddleButtonReleaseMethod
                       ( NullCallback
                       , (void *) myInteractorStyleUser );

GetScalarCallback returns the scalar value at a clicked point.
NullCallback does nothing. These were tested and were working with
vtk 2.4

I initially myInteractor in the method arguements. This was ignored
to I tried myInteractorStyleUser. This too is being ignored.

Any insight/help would be most appreciated. Thanks.

Regards,

Audrius


______________________________________________________
Get Your Private, Free Email at http://www.hotmail.com

--------------------------------------------------------------------
This is the private VTK discussion list. Please keep messages on-topic.
Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
To UNSUBSCRIBE, send message body containing "unsubscribe vtkusers" to
<majordomo at public.kitware.com>. For help, send message body containing
"info vtkusers" to the same address.
--------------------------------------------------------------------



More information about the vtkusers mailing list