ConvexMeshShape QML Type

基于三维网格的凸形碰撞形状。更多

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

CollisionShape

属性

详细描述

该类型基于与QtQuick3D.Model 相同的三维网格文件格式定义凸形。如果网格不是凸形,则将使用网格的凸壳。

另请参阅 " 形状和体 "概述文档和 TriangleMeshShape

属性文档

geometry : Geometry [since 6.7]

此属性定义用于定义形状的网格的几何形状。如果网格不是凸面,则将使用网格的凸面。网格面和顶点的最大数量为 255:如果网格比 255 更详细,则会被简化。

注: 如果同时设置了几何图形和source 属性,则只使用几何图形。

此属性在 Qt 6.7 中引入。

另请参阅 ConvexMeshShape::source


source : url

此属性定义了用于定义形状的网格文件的位置。如果网格不是凸形,则将使用网格的凸壳。网格面和顶点的最大数量为 255:如果网格比这一数量更详细,则会被简化。

在内部,ConvexMeshShape 会将网格转换为优化的数据结构。这种转换可以提前完成。详情请查看烹饪概述文档

注: 如果同时设置了geometry 和源属性,则只会使用geometry

另请参阅 ConvexMeshShape::geometry


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