Home Overview FAQ Documentation Download Mailing List Geomview For Windows? Support Users Development Bug Reporting Contributing Contact Us Sponsors
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Update REQ 6867]: `Pause until key is pressed'
> I wish to use geomview (running on my laptop, which will be attached to > a data projector) to animate in real time some geometric objects, as part > of a conference talk. > > I have written gcl files which perform the manipulations (using Stage > Manager). > > My question: is there a gcl command which will pause execution until a key > is pressed (or a mouse button is clicked etc). I could not find such a > command in the manual. Can you suggest some devious method ?! If you send the command (freeze CAM-ID) then nothing changes in that camera window until you send a (redraw CAM-ID). The command (sleep-for <seconds>) pauses execution of that command stream for that number of seconds. (See also the sleep-until and set-clock commands). Note that redraws are automatically triggered by things like reshaping or popping the window to the front, so you'd want to avoid that. Also note that freeze just stops the display, it doesn't actually stop execution. So, for example, if you drag in the window to start something moving, those calculations are happenning internally even though you don't see any visible change. After the redraw you'll see the object at the same position that it would be in even if the camera hadn't been frozen in the intervening time. More to the point, if you have a gcl file with a bunch of commands, a freeze command in the middle of a stream will freeze the camera but not halt the execution of all the commands that come afterward. So if you have a gcl file like this: (backcolor allcams 0 0 0) (freeze allcams) <whole bunch of other stuff, including several changes of geometry> (backcolor allcams 1 1 1) You will indeed just see the frozen black background. But after you trigger the redraw you'll see the last of the geometries drawn against a white background, since all those commands executed while your display was frozen. Note in particular that if one of those intermediate commands is a redraw, then it will still be executed and undo the freeze. The only way to stop execution is to use the exact timing sleep commands. This works great if you're trying to make a movie, which was the intent of Stage Manager, but is not so nice if you're giving a talk where your timing may vary. (The only other timing thing to be aware of is that if there's a gcl file full of commands and they're *not* wrapped in a progn, it will execute one command per frame. I can't tell if this is relevant in your case.) I'm not really clear on how Stage Manager fits in - are you actually using it live to play back gcl files, or did you just use it to generate the gcl files in the first place and now you're just loading them through the usual interface? If you have a single big gcl file now, can you just turn it into several separate gcl files, splitting at the points where you want a freeze? If you have the input file browser up and pointing to the correct directory, then it's just a couple of mouse clicks to get the new file loaded - the OK key triggers a load but does not make the file browser disappear. By the way, if you're trying to understand what's going on with all this, I recommend running your tests with two camera windows open but only send freeze/redraw commands to one of them, so that you disambiguate between the sleep vs frozen states. That helped me correct a few errors in my thinking in an earlier draft of this reply, at least :) One last slightly devious thing that you may or may not find useful is to define some oneliner GCL external modules in your .geomview file so that you can just click on a line in the main panel modules browser to do certain gcl actions, for instance: (emodule-define "Freeze" "echo \"(freeze allcams)\"") (emodule-define "Continue" "echo \"(redraw allcams)\"") Hope this helps, Tamara
|
||
Home | Overview | FAQ | Documentation | Support | Download | Mailing List Windows? | Development | Bug Reporting | Contributing | Contact Us | Sponsors |
|||
site hosted by |