On Fri, Jan 23, 2009 at 8:57 AM, __doc__ <[email protected]> wrote:
>
> Currently Axis range is implemented however the underlying driver
> delivers it and is complemented with a min/max value.
>
> All (?) uses of an absolute axis I can think of involve normalizing
> the axis value to -1.0/1.0 or 0.0/1.0
>
> - Aircraft bank flaps -->( y_axis.value / (y_axis.max - y_axis.min) )
> * flap_range_of_motion
> - Painting with tablet --> (y_axis.value / (y_axis.max - y_axis.min) )
> * window.width
> - Generalized axis/axis mapping ->  ( (axis.value / (axis.max -
> axis.min) + offset1) * target_range + offset2
>
> I'm far from infallible, but if all sensible uses of an absolute axis
> involve "axis.value / (axis.max - axis.min)", shouldn't the wrapper do
> this by default (and offering the raw_value perhaps as axis.raw_value?

The Joystick class normalises axis values, and the Tablet class throws
them away and uses window coordinates instead.  The reason behind this
decision is that joysticks/gamepads and tablets are the only likely
input device that's generic enough that the user will be using a
specific device that the developer did not have access to.  When
developing for the more esoteric devices, such as space controllers,
my expectation is that the developer is targetting the user's device
specifically, and will more likely know more about the characteristics
of the device (such as min/max values) than what the device advertises
(which are often incorrect).

Alex.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to