このページでは

GridGeometry QML Type

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

Import Statement: import QtQuick3D.Helpers
Inherits:

Geometry

プロパティ

詳細な説明

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

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

指向性照明付き19×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。

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