[vtkusers] render window even processing questions

Chris Volpe cvolpe at ara.com
Tue Feb 17 17:11:13 EST 2004


Hi folks-

  I've got a few questions related to event processing using Vtk with
Tcl/Tk that I was hoping someone could clear up. Basically, what I'd
like to do is allow the user to manipulate the contents of the render
window, but have some script code execute when the user releases one of
the mouse buttons. E.g., user presses left button, spins the camera
around a bit, releases left button, and some action is triggered by the
release. 

  At first, I looked at the docs for vtkRenderWindowInteractor, but
there didn't seem to be a way to "plug into" that, so to speak. I've
seen lots of references to vtkCommand and different event types and
such, but it seems that this whole command/observer architecture is
available only at the C++ level, not at the script level. (Am I correct
about that?)

  So, in the absence of any elegant way to do:

        proc ReleaseAction {} {yadda yadda yadda}

        iren SetLeftButtonReleaseMagicTCLCallback ReleaseAction

I imagine that I need to use vtkTkRenderWidget  and set up the Tk
bindings manually. No problem. The example GUI script MaceTk.tcl shows
how to set this up, but I have a couple questions:

 

1)      There's a line in that script that looks like this:
"::vtk::bind_tk_render_widget $vtkw".  I wasn't previously familiar with
this command, and tcl shell command completion seems to indicate that
there are a bunch of commands beginning with "::vtk::". Is there some
documentation on their purpose and use.

2)      If the vtkRenderWindowInteractor is operating on a
vtkTkRenderWidget's window, is there going to be any any conflict or
contention between vtkRenderWindowInteractor processing events and Tk
processing events? (Or is that what the magic in question #1 above takes
care of?)

 

Thanks,

 

Chris

--
Christopher R. Volpe, Ph.D.

Senior Scientist
Email: cvolpe at ara.com
Applied Research Associates, Inc.                                Voice:
919-582-3380
8540 Colonnade Center Dr., Ste 301
Fax: 919-878-3672
Raleigh, NC 27615
Web: www.ara.com <http://www.ara.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20040217/f1431ee9/attachment.htm>


More information about the vtkusers mailing list