Show / Hide Table of Contents

Class VRPNHandler

Handling VRPN deivces.
處理 VRPN 裝置。

Inheritance
System.Object
Element
VRPNHandler
Inherited Members
Element.name
Element.Equals(String, Boolean)
Element.Contains(String, Boolean, Boolean)
Namespace: Votanic.vIO.VRPN
Assembly: Votanic.vIO.dll
Syntax
public class VRPNHandler : Element

Constructors

VRPNHandler(List<VRPNButtons>, List<VRPNAxes>, List<VRPNTracker>)

Declare the VRPN handler.
宣告 VRPN 處理器。

Declaration
public VRPNHandler(List<VRPNButtons> buttons, List<VRPNAxes> axes, List<VRPNTracker> tracker)
Parameters
Type Name Description
System.Collections.Generic.List<VRPNButtons> buttons

List of VRPN buttons
VRPN 按鈕群列表

System.Collections.Generic.List<VRPNAxes> axes

List of VRPN axes
VRPN 軸群列表

System.Collections.Generic.List<VRPNTracker> tracker

List of VRPN tracker
VRPN 定位器列表

Properties

axes

List of VRPN axes.
VRPN 軸群列表。

Declaration
public List<VRPNAxes> axes { get; }
Property Value
Type Description
System.Collections.Generic.List<VRPNAxes>

buttons

List of VRPN buttons.
VRPN 按鈕群列表。

Declaration
public List<VRPNButtons> buttons { get; }
Property Value
Type Description
System.Collections.Generic.List<VRPNButtons>

tracker

List of VRPN tracker.
VRPN 定位器列表。

Declaration
public List<VRPNTracker> tracker { get; }
Property Value
Type Description
System.Collections.Generic.List<VRPNTracker>

Methods

AxisDown(Int32, AxisDirection, Int32, Boolean, AssistButtons)

Return true if the axis on axes is pressed (Absolute axis value >= Press detect value).
當軸群的軸按下時傳回 true(軸絕對值 >= 按下偵測值)。

AxisDown(0, 0)

Declaration
public bool AxisDown(int index, AxisDirection direction = AxisDirection.Any, int deviceIndex = 0, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type Name Description
System.Int32 index

Axis index
軸編號

AxisDirection direction

The axis pressing direction
軸按住的方向

System.Int32 deviceIndex

Axes index
軸群編號

System.Boolean reversed

Reverse axis value if true
當 true 時反轉軸值

AssistButtons assistButtons

Assist buttons
輔助按鈕

Returns
Type Description
System.Boolean

AxisHold(Int32, AxisDirection, Int32, Boolean, AssistButtons)

Return true if the axis on axes is held for a while (Absolute axis value >= Press detect value).
當軸群的軸長按一段時間時傳回 true(軸絕對值 >= 按下偵測值)。

AxisHold(0, 0)

Declaration
public bool AxisHold(int index, AxisDirection direction = AxisDirection.Any, int deviceIndex = 0, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type Name Description
System.Int32 index

Axis index
軸編號

AxisDirection direction

The axis pressing direction
軸按住的方向

System.Int32 deviceIndex

Axes index
軸群編號

System.Boolean reversed

Reverse axis value if true
當 true 時反轉軸值

AssistButtons assistButtons

Assist buttons
輔助按鈕

Returns
Type Description
System.Boolean

AxisPress(Int32, AxisDirection, Int32, Boolean, AssistButtons)

Return true if the axis on axes is pressing (Absolute axis value >= Press detect value).
當軸群的軸按住時傳回 true(軸絕對值 >= 按下偵測值)。

AxisPress(0, 0)

Declaration
public bool AxisPress(int index, AxisDirection direction = AxisDirection.Any, int deviceIndex = 0, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type Name Description
System.Int32 index

Axis index
軸編號

AxisDirection direction

The axis pressing direction
軸按住的方向

System.Int32 deviceIndex

Axes index
軸群編號

System.Boolean reversed

Reverse axis value if true
當 true 時反轉軸值

AssistButtons assistButtons

Assist buttons
輔助按鈕

Returns
Type Description
System.Boolean

AxisUp(Int32, AxisDirection, Int32, Boolean, AssistButtons)

Return true if the axis on axes is released (Absolute release value >= Press detect value).
當軸群的軸放開時傳回 true(釋放絕對值 >= 按下偵測值)。

AxisUp(0, 0)

Declaration
public bool AxisUp(int index, AxisDirection direction = AxisDirection.Any, int deviceIndex = 0, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type Name Description
System.Int32 index

Axis index
軸編號

AxisDirection direction

The axis pressing direction
軸按住的方向

System.Int32 deviceIndex

Axes index
軸群編號

System.Boolean reversed

Reverse axis value if true
當 true 時反轉軸值

AssistButtons assistButtons

Assist buttons
輔助按鈕

Returns
Type Description
System.Boolean

AxisValue(Int32, Int32, Boolean, AssistButtons)

Return the value of an axis on axes.
傳回軸群中一個軸的值。

AxisValue(0, 0)

Declaration
public float AxisValue(int index, int deviceIndex = 0, bool reversed = false, AssistButtons assistButtons = null)
Parameters
Type Name Description
System.Int32 index

Axis index
軸編號

System.Int32 deviceIndex

Axes index
軸群編號

System.Boolean reversed

Reverse axis value if true
當 true 時反轉軸值

AssistButtons assistButtons

Assist buttons
輔助按鈕

Returns
Type Description
System.Single

ButtonDown(Int32, Int32, Boolean)

Return true if the button on buttons is pressed.
當按鈕群的按鈕按下時傳回 true。

ButtonDown(0, 0)

Declaration
public bool ButtonDown(int index, int deviceIndex = 0, bool reversed = false)
Parameters
Type Name Description
System.Int32 index

Button index
按鈕編號

System.Int32 deviceIndex

Buttons index
按鈕群編號

System.Boolean reversed

Reverse the result if true
當 true 時反轉結果

Returns
Type Description
System.Boolean

ButtonHold(Int32, Int32, Boolean)

Return true if the button on buttons is held for a while.
當按鈕群的按鈕長按一段時間時傳回 true。

ButtonHold(0, 0)

Declaration
public bool ButtonHold(int index, int deviceIndex = 0, bool reversed = false)
Parameters
Type Name Description
System.Int32 index

Button index
按鈕編號

System.Int32 deviceIndex

Buttons index
按鈕群編號

System.Boolean reversed

Reverse the result if true
當 true 時反轉結果

Returns
Type Description
System.Boolean

ButtonPress(Int32, Int32, Boolean)

Return true if the button on buttons is pressing.
當按鈕群的按鈕按住時傳回 true。

ButtonPress(0, 0)

Declaration
public bool ButtonPress(int index, int deviceIndex = 0, bool reversed = false)
Parameters
Type Name Description
System.Int32 index

Button index
按鈕編號

System.Int32 deviceIndex

Buttons index
按鈕群編號

System.Boolean reversed

Reverse the result if true
當 true 時反轉結果

Returns
Type Description
System.Boolean

ButtonUp(Int32, Int32, Boolean)

Return true if the button on buttons is released.
當按鈕群的按鈕放開時傳回 true。

ButtonUp(0, 0)

Declaration
public bool ButtonUp(int index, int deviceIndex = 0, bool reversed = false)
Parameters
Type Name Description
System.Int32 index

Button index
按鈕編號

System.Int32 deviceIndex

Buttons index
按鈕群編號

System.Boolean reversed

Reverse the result if true
當 true 時反轉結果

Returns
Type Description
System.Boolean

TrackerAccessible(String)

Return true if the tracker is accessible.
當定位器可讀取時傳回 true。

TrackerAccessible("HeadTracker")

Declaration
public bool TrackerAccessible(string name)
Parameters
Type Name Description
System.String name

Tracker name
定位器名稱

Returns
Type Description
System.Boolean

TrackerPosition(String)

Get the position of tracker in system.
取得系統中的定位器位置。

TrackerPosition("HeadTracker")

Declaration
public Vector3 TrackerPosition(string name)
Parameters
Type Name Description
System.String name

Tracker name
定位器名稱

Returns
Type Description
UnityEngine.Vector3

TrackerRotation(String)

Get the rotation of tracker in system.
取得系統中的定位器角度。

TrackerRotation("HeadTracker")

Declaration
public Quaternion TrackerRotation(string name)
Parameters
Type Name Description
System.String name

Tracker name
定位器名稱

Returns
Type Description
UnityEngine.Quaternion

Update()

Update the current state of devices.
更新裝置目前狀態。

Declaration
public void Update()
In This Article
Back to top Generated by DocFX