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