Qt Quick 3D Xr

소개
확장 현실(XR)은 가상 현실(VR), 증강 현실(AR), 혼합 현실(MR)을 포괄하는 용어입니다. 이러한 기술은 사용자가 주변 세계를 인식하는 방식을 변화시킬 수 있는 몰입형 경험을 제공합니다. Qt Quick 3D Xr 모듈은 다양한 기기와 플랫폼에서 Qt Quick 3D 를 활용하여 XR 애플리케이션을 개발할 수 있는 API를 제공합니다.
Qt Quick 3D 와 Qt Quick 3D XR 애플리케이션의 차이점
시작점
개발자의 관점에서 볼 때, Qt Quick 3D 애플리케이션과 Qt Quick 3D XR 애플리케이션의 주요 차이점은 장면의 진입점이며, 실제 단위와 추적 데이터를 파악하는 것이 필수적입니다.
Qt Quick 3D 에서 최소한의 애플리케이션은 카메라, 조명, 3D 모델로 구성됩니다. 이러한 요소들의 위치와 크기는 씬의 좌표계에서 정의되며, 이 좌표계는 임의적이며 개발자가 애플리케이션의 요구 사항에 맞게 정의할 수 있습니다.
View3D {
width: 1280
height: 720
PerspectiveCamera {
position: Qt.vector3d(0, 200, 300)
}
DirectionalLight {
}
Node {
id: sceneRoot
Model {
id: model
position: Qt.vector3d(0, -200, 0)
source: "#Cylinder"
materials: [ PrincipledMaterial {
baseColor: "red"
}]
}
}
}XR 애플리케이션을 제작할 때는 장면을 정의할 때 실제 세계의 단위와 추적 데이터를 고려해야 합니다. 카메라의 위치와 방향은 기기의 위치와 방향에 의해 정의되며, 헤드 마운트 디스플레이(HMD)의 경우 사용자의 머리 위치와 방향에 의해 정의됩니다. 씬의 단위는 실제 세계의 단위와 일치해야 합니다. 예를 들어, 문이나 책상의 크기는 실제 세계와 가상 세계에서 동일해야 합니다.
참고: Qt Quick 3D XR 애플리케이션의진입점은 ` View3D `가 아니라 ` XrView`입니다. 또한, ` XrOrigin `는 추적 대상 항목이 배치되는 기준점이 되는 장면의 원점을 정의합니다.
XrView {
DirectionalLight {
}
xrOrigin: XrOrigin {
XrController {
id: rightController
controller: XrController.ControllerRight
}
XrController {
id: leftController
controller: XrController.ControllerLeft
}
}
Node {
id: sceneRoot
Model {
id: floor
source: ":meshes/floor.mesh"
materials: [ PrincipledMaterial {
baseColor: "green"
}]
}
Model {
id: table
property real height: 0.7
position: Qt.vector3d(0, height - 2.5, 0)
source: ":meshes/table.mesh"
materials: PrincipledMaterial {
baseColor: "white"
}
}
Model {
id: monitor
source: ":meshes/monitor.mesh"
y: table.height
XrItem {
id: theScreen
y: monitor.yOffset + height
x: -width / 2
width: monitor.width
height: monitor.height
contentItem: ScreenContent {}
}
}
}
}추가 CMake 함수
모든 Qt Quick 3D Xr 예제의 CmakeLists.txt 파일에서 볼 수 있듯이, 프로젝트의 최상위 CMakeLists 파일에 몇 가지 함수를 추가해야 합니다.
사용자 정의 AndroidManifest.xml 를 지정하고, 프로젝트의 CMakeLists 파일에 다음 줄을 추가하여 해당 파일이 사용되도록 하십시오:
if(ANDROID)
set_property(TARGET xr_simple APPEND PROPERTY QT_ANDROID_PACKAGE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR}/android)
endif()AndroidManifest.xml 설정에 대한 자세한 내용은 ‘Meta Quest 3 시작하기’ 페이지의 관련 섹션을 참조하십시오.
CMakeLists.txt의 변경 사항은 visionOS에도 적용되며, 여기에는 MacOSXBundleInfo.plist.in 파일이 포함됩니다:
if (APPLE AND CMAKE_SYSTEM_NAME STREQUAL "visionOS")
set_target_properties(xr_simple PROPERTIES
MACOSX_BUNDLE_GUI_IDENTIFIER io.qt.xr_simple
MACOSX_BUNDLE_INFO_PLIST ${CMAKE_CURRENT_SOURCE_DIR}/visionos/MacOSXBundleInfo.plist.in
)
endif()다음 단계는 무엇인가요?
특정 기기를 시작하는 방법에 대한 자세한 내용은 ‘Meta Quest 3 시작하기’ 또는 ‘Apple Vision Pro 시작하기’를 참고하세요. 지원되는 플랫폼 및 기기에 대한 자세한 내용은 ‘지원되는 플랫폼’ 페이지를 참조하세요.
특정 Qt Quick 3D Xr API를 찾고 계신다면, API Reference 를 살펴보시거나, Qt Quick 3D Xr API 사용 방법을 보여주는 Qt Quick 3D Xr 예제 중 하나를 직접 사용해 보세요.
빠른 링크
| 플랫폼 및 툴체인 | 시작하기 | API 참조 |
| 예제 | 도구 및 IDE | 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.