XrVirtualMouse QML Type
3Dコントローラーの入力を、2Dアイテムでのマウス入力に変換します。詳細...
| Import Statement: | import QtQuick3D.Xr |
| Since: | Qt 6.8 |
| Inherits: | |
| Status: | Technology preview |
この機能はテクノロジープレビュー段階であり、変更される可能性があります。
プロパティ
- enabled : bool
- leftMouseButton : bool
- middleMouseButton : bool
- rightMouseButton : bool
- scrollPixelDelta : real
- scrollTimerInterval : int
- scrollWheelX : real
- scrollWheelY : real
- source : Node
- view : XrView
詳細な説明
XrVirtualMouse は、3D シーン内の2D ユーザーインターフェースを操作する手段を提供します。
通常、次のように使用されます:
// XrView { id: xrView
// XrController { id: rightController
XrInputAction {
id: rightTrigger
hand: XrInputAction.RightHand
actionId: [XrInputAction.TriggerPressed, XrInputAction.TriggerValue]
}
XrVirtualMouse {
view: xrView
source: rightController
leftMouseButton: rightTrigger.pressed
}プロパティのドキュメント
enabled : bool
仮想マウスが有効かどうかを示します。true の場合、仮想マウスはシーン内の 2D オブジェクトにマウスイベントを送信します。
leftMouseButton : bool
マウスの左ボタンの状態を設定します。
true に設定すると、マウスの左ボタンが押された状態になります。
middleMouseButton : bool
マウスの中ボタン状態を設定します。
true に設定すると、マウスの中ボタンが押された状態になります。
rightMouseButton : bool
マウスの右ボタンの状態を設定します。
trueに設定すると、マウスの右ボタンが押された状態になります。
scrollPixelDelta : real [default: 15]
各スクロールイベントごとにスクロールされる基本距離を定義します。
これは、スクロール速度が 1 のときにスクロールされる距離です。
scrollWheelX およびscrollWheelYも参照してください 。
scrollTimerInterval : int [default: 30]
システムに送信されるスクロールイベント間の時間をミリ秒単位で指定します。
scrollWheelX : real
水平方向のスクロール速度を設定します。
正の値は右へ、負の値は左へスクロールします。スクロール速度は、0からの距離に比例して増加します。
scrollPixelDeltaも参照してください 。
scrollWheelY : real
垂直方向のスクロール速度を設定します。
正の値は上方向へのスクロール、負の値は下方向へのスクロールを指定します。スクロール速度は、ゼロからの距離に比例して増加します。
scrollPixelDeltaも参照してください 。
source : Node
仮想マウスを制御する3Dノード。
source プロパティは通常、XrController に設定されます。マウスイベントは、source ノードのforward vector が2Dアイテムと交差する位置で生成されます。
view : XrView
仮想マウスに関連付けられたXRビュー。仮想マウスが動作するビューを保持します。
© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.