<div>Look at the test TestInteractorTimers.cxx . VTK renderwindowinteractor supports the API to create a repeating timer. You can create a command to observe the timer event and respond. (What you are doing to respond better be quick, unless you want to stop the timer and reschedule).</div>
<div><br><br> </div>
<div><span class="gmail_quote">On 3/12/08, <b class="gmail_sendername">Graham E Voysey</b> <<a href="mailto:gvoysey@infoscitex.com">gvoysey@infoscitex.com</a>> wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hello List,<br><br>I'm using VTK to display a human avatar and manipulate its position.<br>The intended user is a test subject in a motion study who will use a<br>
joystick to position the avatar so that it reflects how the user feels<br>that they are moving.<br><br>I've been asked to modify our script to include logging the camera<br>orientation and position every 250ms. I've hit two areas that confuse<br>
me.<br><br>1. The script currently creates a log file with a hardcoded name. I'd<br>like to change this so that the name of the file is<br><dateAndTimeFirstOpened>.log, so that logs are not accidentally<br>overwritten.<br>
<br>set logFile [open "GSV_log.log" w 0666]<br><br>would replacing the above with something like<br><br>set logFile [open "[clock format [clock seconds]].log" w 0666]<br><br>be anything close to proper syntax?<br>
<br>2. I'm confused about how I would create a loop that would write a line<br>to said logfile at a given time interval. What's a good way to think<br>about this, or do it?<br><br><br>Thanks,<br><br>-graham<br>_______________________________________________<br>
This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</blockquote></div>