Class GorgonGamingDeviceAxisList<T>
A list of axis data values for a gaming device.
Inherited Members
Namespace: Gorgon.Input
Assembly: Gorgon.Input.dll
Syntax
public sealed class GorgonGamingDeviceAxisList<T> : IReadOnlyList<T>, IReadOnlyCollection<T>, IEnumerable<T>, IEnumerable where T : IGorgonGamingDeviceAxis
Type Parameters
Name | Description |
---|---|
T | The type of axis data to store in this collection. This type must implement IGorgonGamingDeviceAxis. |
Properties
| Edit this page View SourceCount
Property to return the number of axes on the gaming device.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
int |
this[GamingDeviceAxis]
Property to return the range for the specified GamingDeviceAxis.
Declaration
public T this[GamingDeviceAxis axis] { get; }
Parameters
Type | Name | Description |
---|---|---|
GamingDeviceAxis | axis |
Property Value
Type | Description |
---|---|
T |
this[int]
Gets the GorgonGamingDeviceAxisInfo at the specified index in the axis list.
Declaration
public T this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
int | index |
Property Value
Type | Description |
---|---|
T |
Methods
| Edit this page View SourceContains(GamingDeviceAxis)
Function to determine if a specific GamingDeviceAxis is supported.
Declaration
public bool Contains(GamingDeviceAxis axis)
Parameters
Type | Name | Description |
---|---|---|
GamingDeviceAxis | axis | Axis to look up. |
Returns
Type | Description |
---|---|
bool | true if the axis is supported, false if not. |
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<T> GetEnumerator()
Returns
Type | Description |
---|---|
IEnumerator<T> | An enumerator that can be used to iterate through the collection. |
TryGetValue(GamingDeviceAxis, out T)
Function to retrieve a GorgonGamingDeviceAxisInfo.
Declaration
public bool TryGetValue(GamingDeviceAxis axis, out T result)
Parameters
Type | Name | Description |
---|---|---|
GamingDeviceAxis | axis | The axis to look up. |
T | result | The GorgonGamingDeviceAxisInfo specified by the axis. |
Returns
Type | Description |
---|---|
bool | true if the axis was found in this list, or false if not. |
Remarks
If the axis
was not found, then the result
parameter will return a GorgonGamingDeviceAxisInfo with default values. Because of this, it is strongly
recommened to use the method return value to determine if the item exists or not.