From: Kevin M. <ke...@vr...> - 2002-02-11 13:35:34
|
I'm leaning towards the -1 to 1, since then you know when the device swings the other way (like in a joystick)... I guess it is arbitrary though. On Mon, 11 Feb 2002, Chad Austin wrote: > > I'd say it should always return some sane value such as: > > > > [0..1] (normalized 0 to 1) > > [-1..1] (normalized -1 to 1) > > Yes, definitely. > In fact, I was just discussing input devices with a longstanding programmer > friend (my mentor, if you will) about input devices, and he even implements > digital devices as being an analog device that only outputs 0 or 1 (square > wave). I'm starting to think our Interface classes should provide this for digital, and a delta capability for analog. this makes it a little more complex, but these are so often used in games: DigitalInput: binary 2-state data, edge triggered 4-state data AnalogInput: analog data, delta'd version of ana data. I can think of cases where all 4 versions would be very convienient to have, which would also make game code more readable. > -- @--@---@---@----@-----@------@------@-----@----@---@---@--@ Kevin Meinert __ _ __ http://www.vrac.iastate.edu/~kevn \ || \| \ / ` Virtual Reality Applications Center \ ||.-'|--\\ Howe Hall, Iowa State University, Ames Iowa \|| \| \`__, ----------------------------------------------------------- |