CapsuleShape QML Type

定义类似药丸的形状。更多

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

CollisionShape

属性

详细说明

该类型定义了一种胶囊形状。这是一个两端各有一个半球的圆柱体。原点位于胶囊的中心。胶囊由diameterheight 指定,前者决定圆柱体和半球的直径,后者决定圆柱体的高度。

注: 使用此形状的缩放变换时,x 分量将用于缩放高度,y 分量将用于缩放直径。即使缩放变换不均匀,圆柱体也始终是完美的圆形。

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

属性文档

diameter : real

此属性定义胶囊的直径

默认值:100


height : real

该属性定义胶囊的高度

默认值:100


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