[vtkusers] vtkRenderWindowInteractor -- Enable vs Start

Sarah Graham sarah at cs.jhu.edu
Mon Jul 17 21:21:26 EDT 2000


Despite K.R.'s best efforts, I am still cloudy on this issue.  Therefore,
I will try to explain it again in a different way.

I have created my own c++ class that creates and manages a pointPicker
object.  The class also creates the renderWindowInteractor this
pointPicker belongs to.  In the class, I have defined an EndPickMethod and
an ExitPickMethod.  The EndPickMethod just saves the picked location
and places a small, spherical marker there.  The ExitPickMethod includes
the call iren->Disable() to end interaction.

Here is what I WANT to happen:
	1) create a new myPointPicker object
	2) render a model
	3) pick points
	4) hit 'q' to end point picking
	5) disable interaction but leave the model displayed
	6) return to "main" where the picked points are displayed
	(After the picking, I need access to the picked points directly;
	I don't want to do file I/O)

Here is what happens:
When I use iren->Start() to start interaction, picking proceeds as
expected, the ExitPickMethod is called when I hit 'q', ending all
interaction, but control never returns to main. (The application just sits
there until I hit ^C.)

When I use iren->Initialize(), iren->Enable() to start interaction, the
model flashes on the screen briefly, then disappears, and control is
returned to main.  In this case, I never get to pick points because the
model disappears so quickly.

Can anyone point out my error?  How can I explicitly start and stop
interaction and regain console-level control when picking is complete?

Any help is greatly appreciated.

Thanks,
-sg

------------------------
Sarah Graham
Johns Hopkins University
sarah at cs.jhu.edu
http://www.sarahgraham.org








More information about the vtkusers mailing list