Class vGear_Measurer
Measurer tool of vGear controller.
vGear 控制器的測量工具。
Inheritance
Namespace: Votanic.vXR.vGear
Assembly: Votanic.vXR.dll
Syntax
[AddComponentMenu("")]
public class vGear_Measurer : vCast_ControllerTool
Fields
continuity
Continue to mark measure point or not.
是否連續標記測量點。
Declaration
[Header("[Settings]")]
[Tooltip("Continue to mark measure point or not.\n是否連續標記測量點。")]
public bool continuity
Field Value
Type | Description |
---|---|
System.Boolean |
decimals
Display decimals of measurer.
測量工具的顯示小數位。
Declaration
[Range(0F, 4F)]
[Tooltip("Display decimals of measurer.\n測量工具的顯示小數位。")]
public int decimals
Field Value
Type | Description |
---|---|
System.Int32 |
isMeasuring
Return true if measuring.
當測量時傳回 true。
Declaration
[Header("[Status]")]
[Tooltip("Return true if measuring.\n當測量時傳回 true。")]
public bool isMeasuring
Field Value
Type | Description |
---|---|
System.Boolean |
linePrefab
Prefab for measurement line.
測量線預製件。
Declaration
[Tooltip("Prefab for measurement line.\n測量線預製件。")]
public GameObject linePrefab
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |
mode
Mode of measurement.
測量模式。
Declaration
[Tooltip("Mode of measurement.\n測量模式。")]
public MeasureMode mode
Field Value
Type | Description |
---|---|
MeasureMode |
multiplier
The scene scale multiplier.
場景大小倍增器。
Declaration
[Tooltip("The scene scale multiplier.\n場景大小倍增器。")]
public float multiplier
Field Value
Type | Description |
---|---|
System.Single |
pointPrefab
Prefab for measurement point.
測量點預製件。
Declaration
[Header("[Components]")]
[Tooltip("Prefab for measurement point.\n測量點預製件。")]
public GameObject pointPrefab
Field Value
Type | Description |
---|---|
UnityEngine.GameObject |
singleMeasurement
The measurer will only keep 1 measure line if true .
當 true 時測量工具只會保留 1 條測量線。
Declaration
[Tooltip("The measurer will only keep 1 measure line.\n測量工具只會保留 1 條測量線。")]
public bool singleMeasurement
Field Value
Type | Description |
---|---|
System.Boolean |
unit
Display unit of measurer.
測量工具的顯示單位。
Declaration
[Tooltip("Display unit of measurer.\n測量工具的顯示單位。")]
public MeasureUnit unit
Field Value
Type | Description |
---|---|
MeasureUnit |
Properties
measured
Number of measured distance.
已測量的距離數目。
Declaration
public int measured { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Methods
Clear()
Remove all the records.
移除所有記錄。
Declaration
public void Clear()
Mark()
Mark the measure point.
標記測量點。
Declaration
public void Mark()
Remove(Int32)
Remove the record.
移除記錄。
Remove(0)
Declaration
public void Remove(int index)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | Index of measure line |
SetContinuity(Boolean)
Set the continuity of measurer tool.
設定測量工具的連續性。
SetContinuity(false)
Declaration
public void SetContinuity(bool continuity)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | continuity | Continue to mark measure point or not |
SetDecimals(Int32)
Set the display decimals.
設定顯示小數位。
SetDecimals(2)
Declaration
public void SetDecimals(int decimals)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | decimals | Display decimals |
SetMode(MeasureMode)
Set the measure mode.
設定測量模式。
SetMode(MeasureMode.Points)
Declaration
public void SetMode(MeasureMode mode)
Parameters
Type | Name | Description |
---|---|---|
MeasureMode | mode | Mode of measurement |
SetUnit(MeasureUnit)
Set the display unit.
設定顯示單位。
SetUnit(MeasureUnit.Meter)
Declaration
public void SetUnit(MeasureUnit unit)
Parameters
Type | Name | Description |
---|---|---|
MeasureUnit | unit | Display unit |