本页内容

ConvexMeshShape QML Type

基于3D网格的凸碰撞形状。更多...

Import Statement: import QtQuick3D.Physics
Since: Qt 6.4
Inherits:

CollisionShape

属性

详细说明

该类型基于与QtQuick3D.Model 所使用的相同3D网格文件格式来定义凸形。如果网格不是凸的,则将使用该网格的凸包。

另请参阅《 Qt Quick 3D 物理形状、刚体和关节》以及《TriangleMeshShape 》。

属性文档

geometry : Geometry [since 6.7]

此属性定义了用于确定形状的网格几何体。如果网格不是凸的,则将使用该网格的凸包。面和顶点的最大数量为 255:如果网格的细节超过此限制,则会对其进行简化。

注意:如果 同时设置了 geometry 和source 属性,则仅使用 geometry 属性。

该属性自 Qt 6.7 起引入。

另请参阅 ConvexMeshShape::source 。

source : url

该属性定义了用于定义形状的网格文件的位置。如果网格不是凸形的,则将使用该网格的凸包。面和顶点的最大数量为 255:如果网格的细节超过此限制,则会对其进行简化。

在内部,ConvexMeshShape 会将网格转换为一种优化后的数据结构。此转换可预先进行。详情请参阅“预处理概述”文档。

注意:如果 同时设置了 `geometry ` 和 `source` 属性,则仅使用 `geometry `。

另请参阅 ConvexMeshShape::geometry 。

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