[vtkusers] vtkRenderWindow::SetExitMethod to close vtkRenderWindow

Anwar Upal upal at me.queensu.ca
Fri Oct 26 11:43:30 EDT 2001


Hi all:

My GUI interface gives control to VTK to render a model and I would like to 
gain control after the rendering is done.

I have defined a newExitMethod in the class that also includes the function 
which calls the vtkRenderWindowInteractor. The newExitMethod structure 
looks like:

	void classname::newExitMethod(void *arg)
	{
	}

And the code that calls vtkRenderWindowInteractor is as shown below:

	vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();
	iren->SetExitMethod (newExitMethod,NULL);

However, the gcc compiler gives the following error:

	"no matching function for call to 
`vtkRenderWindowInteractor::SetExitMethod (const char[14], NULL)'
	/usr/local/ces/sunos/include/vtk/graphics/vtkRenderWindowInteractor.h:212: 
candidates are:
	void vtkRenderWindowInteractor::SetExitMethod(void (*)(void *), 	void *)"

How can I fix this error? And what should my custom method newExitMethod do 
to give me back control (and just close the vtk window instead of 
terminating my application and user interface).

Please help.

from Anwar





More information about the vtkusers mailing list