Re: An Interactively rotating 3D animation ? [message #38018 is a reply to message #37919] |
Mon, 09 February 2004 18:47  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Rick Towler writes:
> Well, I should have said "The only way I know how..." since I don't know
> how to actually poll for mouse input within IDL. The docs advise against
> using CURSOR in draw widgets and I have to admit I haven't tried it.
> Looking at the docs it looks like it blocks if you want button data which
> would eliminate it as a possible kludge in this case anyways. So we're back
> to capturing input via events, aren't we?
I guess I thought you were talking about a "WHILE 1 DO" sort of
event loop, ala CW_DEFROI, which appears to propagate its
havoc everywhere in a device independent way. :-)
> I'm sure there is a way of structuring an event-based application to provide
> smooth animation and user feedback but it is much more difficult than simply
> firing a timer event every n/th of a second then polling, updating and
> drawing. Which is why I wrote a DLM to poll for mouse, keyboard, and game
> device input in windows using directInput. But like I said, it isn't very
> portable.
I'm not sure a DLM is necessary. I'm working on a fairly large
medical imaging application that has a cine going pretty much
all the time with a timer, and we don't have much trouble
drawing ROIs in other widget windows, etc. I guess the key is
getting through your event handlers in a timely fashion, but
this really doesn't seem to be much of a problem on today's
standard computers.
Object graphics can obviously be a bit slower, but even there,
I don't think this would be particularly difficult.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|