Hot wo use 'void SetLeftButtonPressMethod(void(*func)(void *),voi d *arg)' in vtkRenderWindowInterActor

Vetle Roeim vetler at ifi.uio.no
Fri Feb 18 06:19:51 EST 2000


on 2000-02-18, owner-vtkusers at public.kitware.com wrote:

> Hi,all:
>    I want to use 'SetLeftButtonPressMethod(void(*func)(void *),void *arg)'
> to set camera only rotate by 'y-axis.How can I use it.

I guess you would have to do something like this:

  void rotateY( void * ) {
      // rotate the scene
  }


  int main() {
      // set up the standard framework
   
      interactor->SetLeftButtonPressMethod( rotatY, 0 );

      // do some more stuff

      return 0;
  }


Note that if you want the function given as a parameter to be a function
in a class, you'll have to do something a little different.



vr




More information about the vtkusers mailing list