[vtkusers] vtkRenderWindow::SetExitMethod to close vtkRenderWindow

Prabhu Ramachandran prabhu at aero.iitm.ernet.in
Fri Oct 26 12:31:07 EDT 2001


hi,

>>>>> "Bill" == William A Hoffman <billlist at nycap.rr.com> writes:

    Bill> VTK callback functions are all C functions and can not be
    Bill> member functions.  To call a member function, you have to
    Bill> create a "C" function that calls the member funciton:

    Bill> Something like this:

    Bill> void newExtiMethod(void* arg) {
    Bill> static_cast<classname*>(arg)->newExitMethod(); }

Are you sure?  Shouldnt the following code also work?

class Foo{

      // ...
      static void ExitMethod (void *arg);
}

iren->SetExitMethod(&Foo::ExitMethod, NULL);

prabhu



More information about the vtkusers mailing list