[vtkusers] vtkInteractorStyle

David Chelberg chelberg at endor.cs.ohiou.edu
Mon Oct 7 07:57:09 EDT 2002


If I recall correctly, there was some discussion of this in the past.
You might want to check the archives.  I believe that the result was
that member functions must be declared static to be able to be passed
like this.  Otherwise you must use an ordinary function.

 -- Prof. David Chelberg (chelberg at ohiou.edu)

    You are right but this doesn't work either. I have programed a slice 
    viewer object which
    has a mapper, a render window and an interactor. Now, I'd like to define 
    my own
    vtkInteractorStyleUser. My source code is:

    ....
    vtkRenderWindowInteractor *intAct = vtkRenderWindowInteractor::New();
    vtkInteractorStyleUser *style = vtkInteractorStyleUser::New();
	style->SetLeftButtonPressMethodArgDelete(this->get_mousePos);
	intAct->SetInteractorStyle(style);
    ....

    void SliceView::get_mousePos(void *)
    {           
	...
    }

    The error I get is:

    coversion of parameter 1 from 'void (void *)' to 'void (__cdecl *) (void 
    *)' is not possible




More information about the vtkusers mailing list