Geometry QML Type (Uncreatable)
カスタムジオメトリの基底型。詳細...
| Import Statement: | import QtQuick3D |
| In C++: | QQuick3DGeometry |
| Inherits: | |
| Inherited By: |
注:これは作成不可能な型です。QML ではインスタンス化できません。
詳細説明
カスタムジオメトリを使用すると、アプリケーションで生成された頂点およびインデックスデータを利用できます。これらのデータは動的に変更される可能性もあります。カスタムジオメトリを使用するには、Modelのsource として.mesh ファイルを割り当てないでください。代わりに、そのgeometry プロパティを設定して、Geometryオブジェクトを参照するようにしてください。
カスタムジオメトリを実装する一般的な方法は、C++でQQuick3DGeometry のサブクラスを作成し、QMLで使用するために新しい型を登録することです。
また、Helpers モジュールに含まれる組み込みのカスタムジオメトリプロバイダGridGeometry を使用することも可能です。以下はGridGeometry の例です。アプリケーションで提供されたGeometryのサブクラスであれば、同様の方法で利用可能です。
import QtQuick3D.Helpers
Model {
geometry: GridGeometry {
}
materials: [
DefaultMaterial {
diffuseColor: "white"
lighting: DefaultMaterial.NoLighting
}
]
}「 Qt Quick 3D - カスタムジオメトリの例」、「Model 」、および「QQuick3DGeometry 」も参照してください 。
© 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.