TextureData QML Type
カスタムテクスチャデータの基本型。詳細...
Import Statement: | import QtQuick3D |
In C++: | QQuick3DTextureData |
Inherits: | |
Inherited By: |
詳細説明
カスタムテクスチャデータを使用すると、アプリケーションで生成されたテクスチャデータを使用できます。カスタム テクスチャ データを使用するには、Texture のtextureData プロパティを設定して、TextureData オブジェクトを参照します。
カスタム・テクスチャ・データは、QQuick3DTextureData インスタンスを作成し、多くの場合サブクラス化することによって C++ で実装されます。QQuick3DTextureData の型は TextureData という名前で QML に登録されます。サブクラスが QML に登録されると、Texture オブジェクトはそれを参照できるようになります。
このAPIを使う例としては、ファイルから静的な画像を読み込むのではなく、実行時にテクスチャを手続き的に生成する必要がある場合などがあります。
import MyCustomTexture 1.0 Model { source: "#Cube" materials: [ DefaultMaterial { diffuseMap: diffuseMapCustomTexture } ] } Texture { id: diffuseMapCustomTexture textureData: MyCustomTextureData { } }
Texture も参照して ください。
© 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.