Interface IInputDeviceImp
Implementors represent a physical input device.
Namespace: Fusee.Engine.Common
Assembly: Fusee.Engine.Common.dll
Syntax
public interface IInputDeviceImp
Properties
AxesCount
Gets number of axes supported by this device.
Declaration
int AxesCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The axes count. |
AxisImpDesc
Gets a description of the axis. This value can be used in user setup-dialogs or to match axes of devices of different categories.
Declaration
IEnumerable<AxisImpDescription> AxisImpDesc { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<AxisImpDescription> | The description of the axis. |
ButtonCount
Gets the number of buttons supported by this device.
Declaration
int ButtonCount { get; }
Property Value
Type | Description |
---|---|
System.Int32 | The button count. |
ButtonImpDesc
Gets information about of the specified button. This value can be used in user setup-dialogs or to match buttons of devices of different categories.
Declaration
IEnumerable<ButtonImpDescription> ButtonImpDesc { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<ButtonImpDescription> | Information about the button. |
Category
Gets the category of this device. Device categories define a minimal common set of buttons and axes which are identical across all devices sharing the same category.
Declaration
DeviceCategory Category { get; }
Property Value
Type | Description |
---|---|
DeviceCategory | The device category. |
Desc
Gets the human readable name of this device. This parameter can be used in user dialogs to identify devices.
Declaration
string Desc { get; }
Property Value
Type | Description |
---|---|
System.String | The device description. |
Id
Gets an identifier. Implementors take care that this id is unique across all devices managed by a driver.
Declaration
string Id { get; }
Property Value
Type | Description |
---|---|
System.String | The identifier. |
Methods
GetAxis(Int32)
Gets the value currently present at the given axis if its AxisImpDesc identifies it as a to-be-polled axis.
Declaration
float GetAxis(int iAxisId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iAxisId | The axis' Id. |
Returns
Type | Description |
---|---|
System.Single | The value currently set on the axis. |
Remarks
See AxisDescription to get information about how to interpret the values returned by a given axis.
GetButton(Int32)
Gets the state of the given button if its ButtonImpDesc identifies it as a to-be-polled button
Declaration
bool GetButton(int iButtonId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | iButtonId | The Id of the button. |
Returns
Type | Description |
---|---|
System.Boolean | true if the button is currently pressed. false, if the button is currently released. |
Events
AxisValueChanged
Occurs on value changes of axes exhibited by this device. Only applies for axes where the PollAxis is set to false.
Declaration
event EventHandler<AxisValueChangedArgs> AxisValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler<AxisValueChangedArgs> |
ButtonValueChanged
Declaration
event EventHandler<ButtonValueChangedArgs> ButtonValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler<ButtonValueChangedArgs> |