GridGeometry QML Type

グリッドをレンダリングするためのカスタムジオメトリプロバイダ。詳細...

Import Statement: import QtQuick3D.Helpers
Inherits:

Geometry

プロパティ

詳細な説明

このヘルパーはグリッドジオメトリを実装し、シーンにグリッドを表示できるようにします。

例えば、次のスニペットは、1つのライトがあるシーンで、両方向に19個のセルを持つグリッドを表示します。さらに変形しないと、グリッドはデフォルトでカメラの方を向いています。

View3D {
    anchors.fill: parent
    camera: camera

    PerspectiveCamera {
        id: camera
        position: Qt.vector3d(0, 0, 600)
    }

    DirectionalLight {
        position: Qt.vector3d(-500, 500, -100)
        color: Qt.rgba(0.4, 0.2, 0.6, 1.0)
        ambientColor: Qt.rgba(0.1, 0.1, 0.1, 1.0)
    }

    Model {
        scale: Qt.vector3d(100, 100, 100)
        geometry: GridGeometry {
            horizontalLines: 20
            verticalLines: 20
        }
        materials: [ DefaultMaterial { } ]
    }
}

Qt Quick 3D - Custom Geometry ExampleおよびModelも参照して ください。

プロパティ ドキュメント

horizontalLines : int

グリッドの水平線の数を指定します。デフォルト値は 1000 です。


horizontalStep : real

水平線の間隔を指定します。デフォルト値は 0.1 です。


verticalLines : int

グリッド内の垂直線の数を指定します。デフォルト値は 1000。


verticalStep : real

縦線の間隔を指定します。デフォルト値は 0.1 です。


© 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.