Class Tracker
The tracker class. Device type for tracking position and rotation.
按鈕群類別。用於追蹤位置及角度的裝置類型。
Inherited Members
Namespace: Votanic.vIO
Assembly: Votanic.vIO.dll
Syntax
public abstract class Tracker : Device
Constructors
Tracker()
Declare a tracker.
宣告一個定位器。
Declaration
public Tracker()
Tracker(Int32, String, String, Int32, TrackerDirection, TrackerDirection, TrackerDirection)
Declare a tracker.
宣告一個定位器。
Declaration
public Tracker(int index, string name, string address, int channel, TrackerDirection forward, TrackerDirection up, TrackerDirection right)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of tracker |
System.String | name | Name of tracker |
System.String | address | Address of tracker |
System.Int32 | channel | Channel of tracker |
TrackerDirection | forward | Forward axis direction of tracker |
TrackerDirection | up | Up axis direction of tracker |
TrackerDirection | right | Right axis direction of tracker |
Fields
forward
Forward axis direction of tracker.
定位器的前軸方向。
Declaration
[Tooltip("Forward axis direction of tracker.\n定位器的前軸方向。")]
public TrackerDirection forward
Field Value
Type | Description |
---|---|
TrackerDirection |
right
Right axis direction of tracker.
定位器的右軸方向。
Declaration
[Tooltip("Right axis direction of tracker.\n定位器的右軸方向。")]
public TrackerDirection right
Field Value
Type | Description |
---|---|
TrackerDirection |
up
Up axis direction of tracker.
定位器的上軸方向。
Declaration
[Tooltip("Up axis direction of tracker.\n定位器的上軸方向。")]
public TrackerDirection up
Field Value
Type | Description |
---|---|
TrackerDirection |
Methods
Accessible()
Return true if the tracker is accessible.
當定位器可讀取時傳回 true。
Declaration
public abstract bool Accessible()
Returns
Type | Description |
---|---|
System.Boolean |
GetTrackerDirection(String)
Get tracker direction from axis name.
由軸名稱取得定位器方向。
GetTrackerDirection("+X")
Declaration
public static TrackerDirection GetTrackerDirection(string axisName)
Parameters
Type | Name | Description |
---|---|---|
System.String | axisName | Axis name |
Returns
Type | Description |
---|---|
TrackerDirection |
Position()
Get the position of tracker in system.
取得系統中的定位器位置。
Declaration
public abstract Vector3 Position()
Returns
Type | Description |
---|---|
UnityEngine.Vector3 |
Rotation()
Get the rotation of tracker in system.
取得系統中的定位器旋轉。
Declaration
public abstract Quaternion Rotation()
Returns
Type | Description |
---|---|
UnityEngine.Quaternion |
SetTrackerDirections(TrackerDirection, TrackerDirection, TrackerDirection)
Set the tracker directions of coordinate system.
設定定位器座標系統的各個方向。
Declaration
public void SetTrackerDirections(TrackerDirection forward, TrackerDirection up, TrackerDirection right)
Parameters
Type | Name | Description |
---|---|---|
TrackerDirection | forward | Forward direction |
TrackerDirection | up | Up direction |
TrackerDirection | right | Right direction |