Documentation
IContactGloveManager
ContactGlove API へのアクセスを提供するインターフェイスです。 ContactGloveManagerWithSteamVR がこのインターフェイスを実装しています。
GetFingerRotationAmplitude
指の関節の回転量を取得します。
declaration
float GetFingerRotationAmplitude(HandSides hand, FingerRotationAmplitude_e index)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| index | FingerRotationAmplitude_e | 指の関節 |
return
| type | desription |
|---|---|
| float | 回転量(0.0 ~ 1.0) |
GetFingerTransform
指のTransformを取得します。
declaration
Transform GetFingerTransform(HandSides hand, FingerRotationAmplitude_e bone)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| index | FingerRotationAmplitude_e | 指の関節 |
return
| type | desription |
|---|---|
| Transform | 指のTransform |
SetVibration
グローブを振動させます。
declaration
public void SetVibration(HandSides hand, float amplitude, float frequency, float duration)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| amplitude | float | 振動の強さ(0.0 ~ 1.0) |
| frequency | float | 振動の周波数(Hz) |
| duration | float | 振動の継続時間(秒) |
GetVibration
グローブの振動の強さを取得します。
declaration
public VibrationType GetVibration(HandSides hand)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
return
| type | desription |
|---|---|
| VibrationType | 振動の強さと周波数 |
SetHaptics
グローブの触覚モジュールを作動させます。
注意
この関数は、法人向け販売の触覚モジュール搭載モデルでのみ使用可能です。
通常のモデルでは、SetVibrationによる振動のみがサポートされています。
declaration
public void SetHaptics(HandSides hand, ColliderFinger_e section, bool enable)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| section | ColliderFinger_e | 指の節の種類 |
| enable | bool | 動作させるかどうか |
GetControllerInput(Bool)
この関数はv1.1.0以降では消去されています。
bool型のコントローラーの入力を取得します。
declaration
public bool GetControllerInput(HandSides hand, ControllerBoolInputType type)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerBoolInputType | 入力の種類 |
return
| type | desription |
|---|---|
| bool | 入力の状態 |
GetControllerInput (ButtonState)
この関数はv1.1.0で追加されたものです。
ButtonState型のコントローラーの入力を取得します。
declaration
public ButtonState GetControllerInput(HandSides hand, ControllerButtonType type)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerButtonType | 入力の種類 |
return
| type | desription |
|---|---|
| ButtonState | 入力の状態 |
GetControllerInput (Float)
float型のコントローラーの入力を取得します。
declaration
public float GetControllerInput(HandSides hand, ControllerFloatInputType type)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerFloatInputType | 入力の種類 |
return
| type | desription |
|---|---|
| float | 入力の状態 |
AddOnControllerInputHandler
コントローラの入力がOffからOnに変わった時に呼ばれるハンドラを追加します。
declaration
public void AddOnControllerInputHandler(HandSides hand, ControllerButtonType type, ControllerInputHandler handler)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerButtonType | 入力の種類 |
| handler | ControllerInputHandler | ハンドラ |
v1.1.0より前
declaration
public void AddOnControllerInputHandler(HandSides hand, ControllerBoolInputType type, ControllerInputHandler handler)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerBoolInputType | 入力の種類 |
| handler | ControllerInputHandler | ハンドラ |
AddOffControllerInputHandler
コントローラの入力がOnからOffに変わった時に呼ばれるハンドラを追加します。
declaration
public void AddOffControllerInputHandler(HandSides hand, ControllerButtonType type, ControllerInputHandler handler)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerButtonType | 入力の種類 |
| handler | ControllerInputHandler | ハンドラ |
v1.1.0より前
declaration
public void AddOffControllerInputHandler(HandSides hand, ControllerBoolInputType type, ControllerInputHandler handler)parameters
| name | type | desription |
|---|---|---|
| hand | HandSides | 左手か右手か |
| type | ControllerBoolInputType | 入力の種類 |
| handler | ControllerInputHandler | ハンドラ |
HandSides
左手か右手かを表す列挙型です。
declaration
public enum HandSidesfields
| name | type | description |
|---|---|---|
| Left | HandSides | 左手 |
| Right | HandSides | 右手 |
FingerRotationAmplitude_e
指の関節の回転量を表す列挙型です。
declaration
public enum FingerRotationAmplitude_efields
| name | type | description |
|---|---|---|
| LittleProximal | FingerRotationAmplitude_e | 小指第三関節 |
| LittleIntermediate | FingerRotationAmplitude_e | 小指第二関節 |
| LittleDistal | FingerRotationAmplitude_e | 小指第一関節 |
| RingProximal | FingerRotationAmplitude_e | 薬指第三関節 |
| RingIntermediate | FingerRotationAmplitude_e | 薬指第二関節 |
| RingDistal | FingerRotationAmplitude_e | 薬指第一関節 |
| MiddleProximal | FingerRotationAmplitude_e | 中指第三関節 |
| MiddleIntermediate | FingerRotationAmplitude_e | 中指第二関節 |
| MiddleDistal | FingerRotationAmplitude_e | 中指第一関節 |
| IndexProximal | FingerRotationAmplitude_e | 人差し指第三関節 |
| IndexIntermediate | FingerRotationAmplitude_e | 人差し指第二関節 |
| IndexDistal | FingerRotationAmplitude_e | 人差し指第一関節 |
| ThumbProximal | FingerRotationAmplitude_e | 親指第二関節 |
| ThumbIntermediate | FingerRotationAmplitude_e | 親指第一関節 |
| ThumbDistal | FingerRotationAmplitude_e | 親指付け根 |
| ThumbAbduction | FingerRotationAmplitude_e | 親指付け根の回転 |
ControllerBoolInputType
この列挙型はv1.1.0以降では消去されています。
コントローラーのbool型の入力を表す列挙型です。
declaration
public enum ControllerBoolInputTypefields
| name | type | description |
|---|---|---|
| A | ControllerBoolInputType | Aボタン |
| B | ControllerBoolInputType | Bボタン |
| Home | ControllerBoolInputType | ホームボタン |
| JoystickButton | ControllerBoolInputType | ジョイスティックボタン |
| TrackpadTouch | ControllerBoolInputType | トラックパッドタッチ |
ControllerButtonType
この列挙型はv1.1.0で追加されたものです。
ボタンタイプのコントローラー入力を表す列挙型です。
declaration
public enum ControllerButtonTypefields
| name | type | description |
|---|---|---|
| A | ControllerButtonType | Aボタン |
| B | ControllerButtonType | Bボタン |
| System | ControllerButtonType | システムボタン |
| TriggerButton | ControllerButtonType | トリガーボタン |
| JoystickButton | ControllerButtonType | ジョイスティックボタン |
| TrackpadTouch | ControllerButtonType | トラックパッドタッチ |
ButtonState
この列挙型はv1.1.0で追加されたものです。
ボタンタイプのコントローラー入力の入力状態を表す列挙型です。
declaration
public enum ButtonStatefields
| name | type | description |
|---|---|---|
| Idle | ButtonState | ボタンが押されていない |
| Touched | ButtonState | ボタンがタッチされている |
| Pressed | ButtonState | ボタンが押されている |
ControllerFloatInputType
コントローラーのfloat型の入力を表す列挙型です。
declaration
public enum ControllerFloatInputTypefields
| name | type | description |
|---|---|---|
| JoystickX | ControllerFloatInputType | ジョイスティックのX軸 |
| JoystickY | ControllerFloatInputType | ジョイスティックのY軸 |
| Trigger | ControllerFloatInputType | トリガーの押し込み具合 |
| GripValue | ControllerFloatInputType | グリップの押し込み具合 |
| GripForce | ControllerFloatInputType | グリップの押し込み力 |