本页内容

TriangleMeshShape QML Type

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

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

CollisionShape

属性

详细说明

该类型基于QtQuick3D.Model 所使用的相同3D网格文件格式来定义形状。

受物理模拟控制的对象不能使用TriangleMeshShape:它仅可与StaticRigidBody 和kinematic bodies 配合使用。对于非运动学动态物体,请使用ConvexMeshShape 。

另请参阅 Qt Quick 3D 中的“物理形状、刚体和关节”。

属性文档

geometry : Geometry [since 6.7]

此属性定义了用于确定形状的网格的几何形状。

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

该属性自 Qt 6.7 起引入。

另请参阅 TriangleMeshShape::source 。

source : url

此属性定义了用于定义形状的网格文件的位置。

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

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

另请参阅 TriangleMeshShape::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.