Base type for custom geometry. 更多...
import 语句: | import QtQuick3D |
实例化: | QQuick3DGeometry |
继承: | |
继承者: |
Custom geometry allows using application-generated vertex and index data, that can possibly change dynamically as well. To use custom geometry, do not assign a
.mesh
file as the
source
to a Model. Instead, set its
geometry
property to reference a Geometry object.
A typical way of implementing custom geometry is by creating a QQuick3DGeometry subclass in C++ and registering the new type for use with QML.
It is also possible to use the built-in custom geometry provider
GridGeometry
在
Helpers
module. The following is an example of
GridGeometry
. Any application-provided Geometry subclass can be taken into use in the same manner.
import QtQuick3D.Helpers Model { geometry: GridGeometry { } materials: [ DefaultMaterial { diffuseColor: "white" lighting: DefaultMaterial.NoLighting } ] }
另请参阅 Qt Quick 3D - 自定义几何图形范例 , Model ,和 QQuick3DGeometry .