SceneLoader QML Type
기존 씬을 불러올 수 있는 기능을 제공합니다. 더 보기...
| Import Statement: | import Qt3D.Render 2.12 |
| In C++: | QSceneLoader |
| Inherits: | |
| Status: | Deprecated |
이 유형은 더 이상 사용되지 않습니다. 새로운 코드에서는 이 유형을 사용하지 않는 것이 좋습니다.
속성
방법
- Entity component(string entityName, enumeration componentType)
- Entity entity(string entityName)
- list entityNames()
상세 설명
3D 소스 파일이 주어지면, SceneLoader는 해당 파일을 파싱하여 적절한 GeometryRenderer, Transform 및 Material 컴포넌트를 가진 Entity 객체 트리를 구축합니다.
로더는 모델 파일의 속성을 기반으로 사용하기에 가장 적합한 머티리얼을 결정합니다. 사용자 정의 머티리얼을 사용하려면 트리를 탐색하여 기본으로 연결된 머티리얼을 사용자 정의 머티리얼로 교체해야 합니다.
이름에서 알 수 있듯이, SceneLoader는 전체 씬 서브트리를 로드합니다. 단일 지오메트리만 로드하려는 경우에는 대신 Mesh를 사용해야 합니다.
SceneLoader는 내부적으로 다양한 3D 파일 형식을 지원하기 위해 플러그인을 사용합니다. 다음은 Qt3D에서 지원하는 형식 목록입니다.
참고: 이 컴포넌트는 여러 Entity 인스턴스 간에 공유해서는 안 됩니다. 그렇지 않으면 정의되지 않은 동작이 발생할 수 있습니다.
Mesh 및 GeometryRenderer도 참조하십시오 .
속성 문서
source : url
로드할 소스의 URL을 저장합니다.
status : enumeration [read-only]
씬 로딩 상태를 나타냅니다.
- SceneLoader.없음
- SceneLoader.로딩 중
- SceneLoader.준비됨
- SceneLoader.오류
Qt3DRender::QSceneLoader::Status도 참조하십시오 .
메서드 문서
Entity component(string entityName, enumeration componentType)
entityName 와 일치하는 objectName을 가진, 로드된 엔티티의 componentType 에 해당하는 컴포넌트를 반환합니다. 엔티티에 일치하는 컴포넌트가 여러 개 있는 경우, 해당 엔티티의 컴포넌트 목록에서 첫 번째로 일치하는 항목이 반환됩니다. 일치하는 항목이 없는 경우, undefined 항목이 반환됩니다.
- SceneLoader.UnknownComponent 알 수 없는 컴포넌트 유형
- SceneLoader.GeometryRendererComponent Qt3DRender::QGeometryRenderer 컴포넌트
- SceneLoader.TransformComponent Qt3DCore::QTransform 컴포넌트
- SceneLoader.MaterialComponent Qt3DRender::QMaterial 컴포넌트
- SceneLoader.LightComponent Qt3DRender::QAbstractLight 컴포넌트
- SceneLoader.CameraLensComponent Qt3DRender::QCameraLens 컴포넌트
Qt3DRender::QSceneLoader::ComponentType도 참조하십시오 .
Entity entity(string entityName)
entityName 매개변수와 일치하는 objectName 을 가진 로드된 엔티티를 반환합니다. 동일한 이름을 가진 엔티티가 여러 개 있는 경우, 어떤 엔티티가 반환될지는 정의되지 않지만, 항상 동일한 엔티티가 반환됩니다.
list entityNames()
로드된 엔티티의 objectNames 목록을 반환합니다.
© 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.