XrInputAction QML Type
입력 컨트롤러의 동작을 나타냅니다. 더 보기...
Import Statement: | import QtQuick3D.Xr |
Since: | Qt 6.8 |
Inherits: | |
Status: | Technical Preview |
속성
- actionId : List<enumeration>
- actionName : string
- hand : enumeration
- pressed : bool
- value : real
신호
상세 설명
액션은 버튼 누름과 같은 부울이거나 조이스틱 축과 같은 아날로그일 수 있습니다.
부울 액션에 반응하려면 pressed 속성 또는 triggered 신호를 사용합니다. 아날로그 액션은 value 프로퍼티를 설정합니다.
참고: 편의를 위해 아날로그 프로퍼티는 pressed
프로퍼티를 설정하고 triggered
신호를 방출하며, 부울 프로퍼티는 누를 때 value
을 1.0으로 설정합니다.
다음은 오른손 그립을 누르거나 손 추적에서 오른손 핀치 제스처에 반응하는 방법을 보여줍니다:
XrInputAction { hand: XrInputAction.RightHand actionId: [XrInputAction.SqueezePressed, XrInputAction.SqueezeValue, XrInputAction.IndexFingerPinch] onTriggered: console.log("Do action here.") }
SqueezePressed
및 SqueezeValue
을 모두 지정하는 이유는 일부 컨트롤러에는 아날로그 그립 버튼이 있고 일부 컨트롤러에는 온/오프 그립 스위치만 있기 때문입니다.
속성 문서
actionId : List<enumeration> |
반응할 액션을 지정합니다.
다음 값이 될 수 있는 ID 목록을 보유합니다:
상수 | 설명 |
---|---|
XrInputAction.Button1Pressed | 버튼 1을 눌렀습니다. 부울. |
XrInputAction.Button1Touched | 버튼 1이 터치되었습니다. 부울입니다. |
XrInputAction.Button2Pressed | 버튼 2를 눌렀습니다. 부울입니다. |
XrInputAction.Button2Touched | 버튼 2가 터치되었습니다. 부울. |
XrInputAction.ButtonMenuPressed | 메뉴 버튼을 눌렀습니다. 부울. |
XrInputAction.ButtonMenuTouched | 메뉴 버튼이 터치되었습니다. 부울. |
XrInputAction.ButtonSystemPressed | 시스템 버튼을 눌렀습니다. 부울. |
XrInputAction.ButtonSystemTouched | 시스템 버튼이 터치되었습니다. 부울. |
XrInputAction.SqueezeValue | 그립 버튼을 누른 거리. 아날로그. |
XrInputAction.SqueezeForce | 그립 버튼에 가해진 힘입니다. 아날로그. |
XrInputAction.SqueezePressed | 그립 버튼이 눌렸는지 여부. 부울. |
XrInputAction.TriggerValue | 트리거 버튼이 얼마나 눌렸는지. 아날로그. |
XrInputAction.TriggerPressed | 트리거가 눌렀습니다. 부울. |
XrInputAction.TriggerTouched | 트리거가 터치되었습니다. 부울. |
XrInputAction.ThumbstickX | 썸스틱의 X축 값입니다. 아날로그. |
XrInputAction.ThumbstickY | 썸스틱의 Y축 값입니다. 아날로그. |
XrInputAction.ThumbstickPressed | 썸스틱을 눌렀는지 여부. 부울. |
XrInputAction.ThumbstickTouched | 썸스틱을 터치했는지 여부. 부울. |
XrInputAction.ThumbrestTouched | 엄지손가락이 터치되었습니다. 부울입니다. |
XrInputAction.TrackpadX | 트랙패드의 X축 위치입니다. 아날로그. |
XrInputAction.TrackpadY | 트랙패드에서 Y축 위치입니다. 아날로그. |
XrInputAction.TrackpadForce | 트랙패드에 가해지는 힘입니다. 아날로그. |
XrInputAction.TrackpadTouched | 트랙패드가 터치되었습니다. 부울. |
XrInputAction.TrackpadPressed | 트랙패드를 눌렀습니다. 부울. |
XrInputAction.IndexFingerPinch | 엄지 손가락에서 검지 손가락으로 집는 제스처. 부울. |
XrInputAction.MiddleFingerPinch | 엄지 손가락에서 가운데 손가락으로 집는 제스처. 부울. |
XrInputAction.RingFingerPinch | 엄지에서 약지로 집는 제스처. 부울입니다. |
XrInputAction.LittleFingerPinch | 엄지와 새끼 손가락을 꼬집는 제스처. 부울. |
XrInputAction.HandTrackingMenuPress | 손 추적 메뉴 제스처. 부울. |
actionName : string |
입력 동작의 이름입니다.
이 속성을 사용하여 반응할 사용자 지정 입력 동작의 이름을 지정합니다. actionId 이 설정되어 있으면 이 속성은 영향을 미치지 않습니다.
hand : enumeration |
이 입력 동작이 적용될 손입니다.
반응할 손을 지정합니다.
다음 중 하나가 될 수 있습니다:
상수 | 값 |
---|---|
XrInputAction.LeftHand | |
XrInputAction.RightHand | |
XrInputAction.Unknown |
pressed : bool |
입력 동작이 현재 눌려 있는지 여부를 나타냅니다.
이 속성을 사용하여 입력 동작(예: 버튼)이 현재 눌려 있는지 확인합니다.
value : real |
입력 동작의 아날로그 값입니다.
엄지손가락 위치와 같은 아날로그 입력의 경우 이 속성은 입력 값(일반적으로 [0, 1] 범위)을 보유합니다.
신호 문서
triggered() |
이 신호는 부울 액션이 활성화될 때 발생합니다. 이는 pressed 속성이 true
으로 설정되는 동시에 발생합니다.
참고: 해당 핸들러는 onTriggered
입니다.
© 2025 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.