DigitalSpaces::DIUserInput1 Struct Reference
[User Input Interfaces]

#include <Interfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Detailed Description

DInterface for polling input based events by name.

Event names are created by mapping within the .space file.

Todo:
This system needs revision.
Example configuration in the .space format (not complete):
		<configuration id="{B11EFB3C-E3C6-4df8-9BBD-61F56B82F70B}" >
			<map signal="FORWARD" >
				<event code="KC_E" type="switch" multiplier="100.0" />
				<event code="KC_UP" type="switch" multiplier="10" />
			</map>
			<map signal="TURN_LEFT" >
				<event code="MA_X_NEG" type="switch" multiplier="0.1" />
			</map>
			<map signal="MOUSE_X_ABS">
				<event code="MA_X" type="switch" multiplier="1.0" />
			</map>
			<map signal="MOUSE_Y_ABS">
				<event code="MA_Y" type="switch" multiplier="1.0" />
			</map>
			<map signal="MOUSE_CLICK">
				<event code="MB_1" type="switch" multiplier="1.0" />
			</map>
		</configuration>
		
MOUSE_X_ABS, MOUSE_Y_ABS and MOUSE_CLICK should always be defined, as these signals are used by the GUI.

<event code=""> values supported by the current implementation (UserInput_DirectInput) are:

The existing implementation (UserInput_DirectInput) also always supports reading a joystick using: There is also a hardcoded map from the Print Screen keyboard button to PRINT_SCREEN.

Each of these hard coded signal names can also be supplimented by using a <map signal="HAPTIC_XAXIS"> configuration. This can be used to provide keyboard keys that are detected as joystick motions. Note that you will need to use a large multiplier, such as 30000. Also note that the system will interpret a keypress as going from zero to this multiplier value immediately, not as a ramped increase. Also, if the keyboard and joystick are used at the same time, the values are added. Not only will pushing Backward on the joystick and Forward on the keyboard cause an approximately 0 value for the HAPTIC_YAXIS, pressing Forward on both will actually produce values in excess of the 32767 limit.


Public Member Functions

float QuerySignal (const char *sSignal)
 Returns a floating point value indicating the value of the specified signal.

Member Function Documentation

float DigitalSpaces::DIUserInput1::QuerySignal ( const char *  sSignal  ) 

Returns a floating point value indicating the value of the specified signal.

If the specified signal is not recognised, a value of 0.0 should be returned.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:28 2008 for Digital Spaces by  doxygen 1.5.6