Scene2D QML Type
이 유형을 사용하면 qml을 텍스처로 렌더링한 다음 3D 씬의 일부로 사용할 수 있습니다. 더 보기...
Import Statement: | import QtQuick.Scene2D 2.8 |
In C++: | QScene2D |
Status: | Deprecated |
속성
- entities : list<Entity>
- item : Item
- mouseEnabled : bool
- output : RenderTargetOutput
- renderPolicy : enumeration
상세 설명
이 오브젝트는 RenderControl을 사용하여 주어진 아이템을 사용자가 제공한 텍스처에 첨부된 화면 밖 표면으로 렌더링합니다. 이를 통해 컴포넌트는 중간 복사 없이 텍스처에 직접 렌더링할 수 있으며 사용자는 3D 씬에서 텍스처가 어떻게 사용되는지 자유롭게 지정할 수 있습니다.
Scene2D를 사용하는 엔티티를 유형과 연결하여 항목과 상호 작용할 수 있으며, 엔티티에 ObjectPicker 컴포넌트가 있는 경우 해당 피커의 선택 이벤트가 Scene2D로 전송되어 마우스 이벤트로 변환된 후 항목으로 최종 전송됩니다.
참고: 마우스 이벤트만 지원됩니다. 이 항목은 키보드 입력을 지원하지 않습니다.
사용법:
Entity { id: sceneRoot // specify Scene2D inside the entity hierarchy Scene2D { // specify output output: RenderTargetOutput { attachmentPoint: RenderTargetOutput.Color0 texture: Texture2D { id: textureId width: 1024 height: 1024 format: Texture.RGBA8_UNorm } } // specify entities entities: [entityId] // specify rendered content Rectangle { color: "red" } } Entity { id: entityId property Material material: TextureMaterial { texture: textureId } property ObjectPicker picker: ObjectPicker { hoverEnabled: true dragEnabled: true } ...
속성 문서
Scene2D 개체와 연관된 엔티티 목록을 보유합니다. 엔티티에 ObjectPicker 이 있는 경우 해당 엔티티의 선택 이벤트는 Scene2D 으로 전송되어 마우스 이벤트로 변환됩니다.
mouseEnabled : bool |
렌더링된 항목에 마우스 이벤트가 활성화되었는지 여부를 보유합니다. 마우스 이벤트는 Scene2D 에 추가된 엔티티의 오브젝트 선택 이벤트에서 생성됩니다. 마우스는 기본적으로 활성화되어 있습니다.
참고: 백엔드에서 발생하는 오브젝트 선택으로 인해 아이템으로 전송되는 이벤트가 한 프레임 지연됩니다.
output : RenderTargetOutput |
Scene2D 이 렌더링되는 위치를 지정하는 RenderTargetOutput 을 보유합니다.
renderPolicy : enumeration |
© 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.