Class Axes
The axes class. Device type that contains group of axis.
軸群類別。包含一組軸的裝置類型。
Inherited Members
Namespace: Votanic.vIO
Assembly: Votanic.vIO.dll
Syntax
public abstract class Axes : Device
Constructors
Axes()
Declare an axes.
宣告一個軸群。
Declaration
public Axes()
Axes(Int32, String, String, Int32, Int32, Single, Single, Single)
Declare an axes.
宣告一個軸群。
Declaration
public Axes(int index, string name, string address, int channel, int numberOfAxis, float deadZone = 0.14F, float pressDetect = 0.7F, float holdingDuration = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of axes |
System.String | name | Name of axes |
System.String | address | Address of axes |
System.Int32 | channel | Channel of axes |
System.Int32 | numberOfAxis | Number of axis in axes |
System.Single | deadZone | Dead zone of axes |
System.Single | pressDetect | Press detect value of axes |
System.Single | holdingDuration | Holding seconds of hold input type |
Fields
deadZone
Default dead zone of axes.
軸群預設死區。
Declaration
[Tooltip("Default dead zone of axes.\n軸群預設死區。")]
public float deadZone
Field Value
Type | Description |
---|---|
System.Single |
numberOfAxis
Number of axis in axes.
軸群的軸數量。
Declaration
[Tooltip("Number of axis in axes.\n軸群的軸數量。")]
public int numberOfAxis
Field Value
Type | Description |
---|---|
System.Int32 |
pressDetect
Default press detect value of axes.
軸群預設按下偵測值。
Declaration
[Tooltip("Default press detect value of axes.\n軸群預設按下偵測值。")]
public float pressDetect
Field Value
Type | Description |
---|---|
System.Single |
Methods
AxisDown(Int32, AxisDirection, Boolean, AssistButtons)
Return true if the axis is pressed (Absolute axis value >= Press detect value).
當軸按下時傳回 true(軸絕對值 >= 按下偵測值)。
AxisDown(0)
Declaration
public virtual bool AxisDown(int index, AxisDirection direction = AxisDirection.Any, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
AxisDirection | direction | The axis pressing direction |
System.Boolean | reversed | Reverse axis value if true |
AssistButtons | assistButtons | Assist buttons |
Returns
Type | Description |
---|---|
System.Boolean |
AxisHold(Int32, AxisDirection, Boolean, AssistButtons)
Return true if the axis is held for a while (Absolute axis value >= Press detect value).
當軸長按一段時間時傳回 true(軸絕對值 >= 按下偵測值)。
AxisHold(0)
Declaration
public virtual bool AxisHold(int index, AxisDirection direction = AxisDirection.Any, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
AxisDirection | direction | The axis pressing direction |
System.Boolean | reversed | Reverse axis value if true |
AssistButtons | assistButtons | Assist buttons |
Returns
Type | Description |
---|---|
System.Boolean |
AxisPress(Int32, AxisDirection, Boolean, AssistButtons)
Return true if the axis is pressing (Absolute axis value >= Press detect value).
當軸按住時傳回 true(軸絕對值 >= 按下偵測值)。
AxisPress(0)
Declaration
public virtual bool AxisPress(int index, AxisDirection direction = AxisDirection.Any, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
AxisDirection | direction | The axis pressing direction |
System.Boolean | reversed | Reverse axis value if true |
AssistButtons | assistButtons | Assist buttons |
Returns
Type | Description |
---|---|
System.Boolean |
AxisUp(Int32, AxisDirection, Boolean, AssistButtons)
Return true if the axis is released (Absolute release value >= Press detect value).
當軸放開時傳回 true(釋放絕對值 >= 按下偵測值)。
AxisUp(0)
Declaration
public virtual bool AxisUp(int index, AxisDirection direction = AxisDirection.Any, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
AxisDirection | direction | The axis pressing direction |
System.Boolean | reversed | Reverse axis value if true |
AssistButtons | assistButtons | Assist buttons |
Returns
Type | Description |
---|---|
System.Boolean |
AxisValue(Int32, Boolean, AssistButtons)
Return the value of an axis.
傳回一個軸的值。
AxisValue(0)
Declaration
public abstract float AxisValue(int index, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
System.Boolean | reversed | Reverse axis value if true |
AssistButtons | assistButtons | Assist buttons |
Returns
Type | Description |
---|---|
System.Single |
ReleaseValue(Int32, Boolean)
Return the stored maximum value of an axis after released.
傳回一個軸釋放後儲存的最大值。
ReleaseValue(0)
Declaration
public virtual float ReleaseValue(int index, bool reversed = false)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Axis index |
System.Boolean | reversed | Reverse axis value if true |
Returns
Type | Description |
---|---|
System.Single |
SetDeadZone(Int32, Single)
Set the dead zone to an axis.
設定一個軸的死區。
SetDeadZone(0, 0.14f)
Declaration
public virtual void SetDeadZone(int index, float deadZone = 0.14F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Target index |
System.Single | deadZone | Target dead zone |
SetDeadZone(Single, Boolean)
Set the dead zone of axes.
設定軸群的死區。
SetDeadZone(0.14f, true)
Declaration
public virtual void SetDeadZone(float deadZone = 0.14F, bool setToAll = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | deadZone | Target deadzone |
System.Boolean | setToAll | Set to all input indices if true, else only set to the index using global value
|
SetHoldingDuration(Int32, Single)
Set the holding type target seconds of an axis.
設定一個軸的長按時間。
SetHoldingDuration(0, 1)
Declaration
public virtual void SetHoldingDuration(int index, float holdingDuration = 1F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Target index |
System.Single | holdingDuration | Target seconds |
SetHoldingDuration(Single, Boolean)
Set the holding type target seconds of axes.
設定軸群長按輸入類型所需的目標秒數。
SetHoldingDuration(1, true)
Declaration
public virtual void SetHoldingDuration(float holdingDuration = 1F, bool setToAll = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | holdingDuration | Target seconds |
System.Boolean | setToAll | Set to all input indices if true, else only set to the index using global value
|
SetPressDetect(Int32, Single)
Set the press detect value to an axis.
設定一個軸的按下偵測值。
SetPressDetect(0, 0.7f)
Declaration
public virtual void SetPressDetect(int index, float pressDetect = 0.7F)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Target index |
System.Single | pressDetect | Target press detect value |
SetPressDetect(Single, Boolean)
Set the press detect value of axes.
設定軸群的按下偵測值。
SetPressDetect(0.7f, true)
Declaration
public virtual void SetPressDetect(float pressDetect = 0.7F, bool setToAll = false)
Parameters
Type | Name | Description |
---|---|---|
System.Single | pressDetect | Target press detect value |
System.Boolean | setToAll | Set to all input indices if true, else only set to the index using global value
|