Class Entity
vCast Entity Node for tracking real world object position and rotation.
 vCast 實體節點用於定位真實世界物件的位置及角度。
Inherited Members
Namespace: Votanic.vXR.vCast.Core
Assembly: Votanic.vXR.dll
Syntax
public class Entity : NodeFields
lostTracking
Lost Tracking setting of entity. 
 實體的定位失敗設定。
Declaration
public LostTracking lostTrackingField Value
| Type | Description | 
|---|---|
| LostTracking | 
Properties
enableTracking
Return true if the tracking of entity is enable. 
 當實體定位啟用時傳回 true。
Declaration
public bool enableTracking { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
eulerAngles
Current world space euler angles. 
 目前在世界的角度。
Declaration
public Vector3 eulerAngles { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Vector3 | 
isTrackPosition
Track position of tracker if true. 
 當 true 時追蹤定位器位置 。
Declaration
public bool isTrackPosition { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
isTrackRotation
Track rotation of tracker if true. 
 當 true 時追蹤定位器角度。
Declaration
public bool isTrackRotation { get; }Property Value
| Type | Description | 
|---|---|
| System.Boolean | 
localEulerAngles
Current local euler angles in parent. 
 目前在母物件的角度。
Declaration
public Vector3 localEulerAngles { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Vector3 | 
localPosition
Current local position in parent. 
 目前在母物件的位置。
Declaration
public Vector3 localPosition { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Vector3 | 
localRotation
Current local rotation in parent. 
 目前在母物件的旋轉。
Declaration
public Quaternion localRotation { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Quaternion | 
position
Current world space position. 
 目前在世界的位置。
Declaration
public Vector3 position { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Vector3 | 
rotation
Current world space rotation. 
 目前在世界的旋轉。
Declaration
public Quaternion rotation { get; }Property Value
| Type | Description | 
|---|---|
| UnityEngine.Quaternion | 
Methods
EnableTracking(Boolean)
Enable or disable the tracking function of the entity.
 啟用或停用實體的定位功能。
EnableTracking(true)
Declaration
public void EnableTracking(bool enable)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | enable | Enable if true  | 
GetTracker()
Return the current attached trackers of the entity.
 取得實體目前連結的定位器。
Declaration
public Tracker[] GetTracker()Returns
| Type | Description | 
|---|---|
| Tracker[] | 
ResetTransform()
Reset position and euler angles of entity to default value.
 還原實體的位置及角度至預設值。
Declaration
public void ResetTransform()SetEulerAngles(Vector3)
Set the relative euler angles of entity to its parent.
 設定實體在母體的相對角度。
SetEulerAngles(Vector3.zero)
Declaration
public void SetEulerAngles(Vector3 eulerAngles)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.Vector3 | eulerAngles | Relative euler angles  | 
SetPosition(Vector3)
Set the relative position of entity to its parent.
 設定實體在母體的相對位置。
SetPosition(Vector3.zero)
Declaration
public void SetPosition(Vector3 position)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.Vector3 | position | Relative position  | 
SetPositionOffset(Vector3)
Set the offset of relative position.
 設定相對位置的偏移位置。
SetPositionOffset(Vector3.zero)
Declaration
public void SetPositionOffset(Vector3 position)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.Vector3 | position | Offset  | 
SetRotationOffset(Vector3)
Set the offset of relative euler angles.
 設定相對角度的偏移角度。
SetRotationOffset(Vector3.zero)
Declaration
public void SetRotationOffset(Vector3 eulerAngles)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.Vector3 | eulerAngles | Offset  | 
SetTracker(Int32)
Attach a tracker to the entity.
 將定位器連上實體。
SetTracker(0)
Declaration
public void SetTracker(int index)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | index | Related tracker index  | 
SetTracker(Int32, Int32)
Attach a tracker to the entity.
 將定位器連上實體。
SetTracker(0, 2)
Declaration
public void SetTracker(int position, int rotation)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Int32 | position | Related position tracker index  | 
| System.Int32 | rotation | Related rotation tracker index  | 
SetTracker(String)
Attach a tracker to the entity.
 將定位器連上實體。
SetTracker("Head.Tracker")
Declaration
public void SetTracker(string tracker)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | tracker | Related tracker name  | 
SetTracker(String, String)
Attach a tracker to the entity.
 將定位器連上實體。
SetTracker("Head.Tracker", "Head2.Tracker")
Declaration
public void SetTracker(string position, string rotation)Parameters
| Type | Name | Description | 
|---|---|---|
| System.String | position | Related position tracker name  | 
| System.String | rotation | Related rotation tracker name  | 
SetTransform(Vector3, Vector3)
Set the relative position and euler angles of entity to its parent.
 設定實體在母體的相對位置及角度。
SetTransform(Vector3.zero, Vector3.zero)
Declaration
public void SetTransform(Vector3 position, Vector3 eulerAngles)Parameters
| Type | Name | Description | 
|---|---|---|
| UnityEngine.Vector3 | position | Relative position  | 
| UnityEngine.Vector3 | eulerAngles | Relative euler angles  | 
TrackPosition(Boolean)
Enable or disable to track position of tracker.
 啟用或停用追蹤定位器位置。
TrackPosition(true)
Declaration
public void TrackPosition(bool enable)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | enable | Enable if true  | 
TrackRotation(Boolean)
Enable or disable the track rotation of tracker.
 啟用或停用追蹤定位器角度。
TrackRotation(true)
Declaration
public void TrackRotation(bool enable)Parameters
| Type | Name | Description | 
|---|---|---|
| System.Boolean | enable | Enable if true  |