Class WindowsTouchInputDeviceImp
Touch input device implementation for the Windows platform. This implementation directly
sniffles at the render window's message pump (identified by the
Inheritance
Implements
Inherited Members
Namespace: Fusee.Engine.Imp.Graphics.Desktop
Assembly: Fusee.Engine.Imp.Graphics.Desktop.dll
Syntax
public class WindowsTouchInputDeviceImp : IInputDeviceImp
Constructors
WindowsTouchInputDeviceImp(GameWindow)
Initializes a new instance of the WindowsTouchInputDeviceImp class.
Declaration
public WindowsTouchInputDeviceImp(GameWindow gameWindow)
Parameters
| Type | Name | Description |
|---|---|---|
| GameWindow | gameWindow | The game window to hook on to receive WM_POINTER messages. |
Properties
AxesCount
Returns the number of axes. Up to five touchpoints (with two axes (X and Y) per Touchpoint plus one axis carrying the number of currently touched touchpoints plus four axes describing the minimum and maximum X and Y values.
Declaration
public int AxesCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The axes count. |
AxisImpDesc
Returns description information for all axes.
Declaration
public IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<AxisImpDescription> |
ButtonCount
Retrieves the button count. One button for each of the up to five supported touchpoints signaling that the touchpoint currently has contact.
Declaration
public int ButtonCount { get; }
Property Value
| Type | Description |
|---|---|
| System.Int32 | The button count. |
ButtonImpDesc
Retrieve a description for each button.
Declaration
public IEnumerable<ButtonImpDescription> ButtonImpDesc { get; }
Property Value
| Type | Description |
|---|---|
| System.Collections.Generic.IEnumerable<ButtonImpDescription> | The button imp description. |
Category
Returns Touch, just because it's a touch device :-).
Declaration
public DeviceCategory Category { get; }
Property Value
| Type | Description |
|---|---|
| DeviceCategory |
Desc
Short description string for this device to be used in dialogs.
Declaration
public string Desc { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Id
Returns a (hopefully) unique ID for this driver. Uniqueness is granted by using the full class name (including namespace).
Declaration
public string Id { get; }
Property Value
| Type | Description |
|---|---|
| System.String |
Methods
GetAxis(Int32)
Retrieves values for the number of currently active touchpoints and the touches min and max values. The touchpoint X and Y axes themselves are event-based axes. Do not query them here.
Declaration
public float GetAxis(int iAxisId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | iAxisId | The axis to retrieve information for. |
Returns
| Type | Description |
|---|---|
| System.Single | The value at the given axis. |
GetButton(Int32)
Gets the button state. This device's buttons signal that a finger (nose, elbow, knee...) currently has contact with the scree surface.
Declaration
public bool GetButton(int iButtonId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | iButtonId | The button identifier. |
Returns
| Type | Description |
|---|---|
| System.Boolean | true if the button is hit, else false |
Events
AxisValueChanged
Occurs on value changes of axes exhibited by this device. Only applies for axes where the PollAxis is set to false.
Declaration
public event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<AxisValueChangedArgs> |
ButtonValueChanged
A touchpoints's contact state is communicated by a button.
Declaration
public event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
| Type | Description |
|---|---|
| System.EventHandler<ButtonValueChangedArgs> |