Geometry QML Type

An Abstract base type for custom geometry. 更多...

import 语句: import QtQuick3D 1.15
实例化: QQuick3DGeometry
继承:

Object3D

继承者:

GridGeometry

特性

详细描述

The Geometry can be used to specify custom geometry used with Qt Quick 3D. The custom geometry should be implemented with C++ and registered to QML.

The geometry is identified with unique name, which is used by the engine to distinguish different models. Instances of same custom geometry type with different parameters should specify different unique id. The name can be used with model source to share the same geometry with different models.

import QtQuick3D.Helpers 1.15
Model {
    id: gridModel
    geometry: GridGeometry {
        name: "grid"
    }
    materials: [
        DefaultMaterial {
            emissiveColor: "white"
            lighting: DefaultMaterial.NoLighting
        }
    ]
}
					

另请参阅 Model .

特性文档编制

name : string

Unique name identifying the geometry.