Scene2D QML Type
この型はqmlをテクスチャにレンダリングし、3Dシーンの一部として使用できるようにする。詳細...
| Import Statement: | import QtQuick.Scene2D 2.10 |
| In C++: | QScene2D |
| Status: | Deprecated |
プロパティ
- entities : list<Entity>
- item : Item
- mouseEnabled : bool
- output : RenderTargetOutput
- renderPolicy : enumeration
詳細説明
このオブジェクトはRenderControlを使用して、与えられたItemをオフスクリーンのサーフェスにレンダリングします。これにより、コンポーネントは中間コピーなしでテクスチャに直接レンダリングでき、ユーザーはテクスチャが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 に追加されたエンティティのオブジェクト ピッキング イベントから生成されます。 デフォルトでマウスは有効になっています。
注: アイテムに送信されるイベントは、バックエンドでオブジェクトピッキングが発生するため、1 フレーム分遅延します。
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.