CapsuleGeometry QML Type
提供胶囊的几何形状。更多
| Import Statement: | import QtQuick3D.Helpers |
| Since: | Qt 6.10 |
| Inherits: |
属性
- asynchronous : bool
- diameter : real
- enableNormals : bool
- enableUV : bool
- height : real
- latitudes : int
- longitudes : int
- rings : int
- status : bool
- uvProfile : UVProfile
详细说明
用于生成胶囊模型的几何体。胶囊以(0, 0, 0) 为中心,高度沿 x 轴方向延伸,直径沿 yz 平面延伸。
属性文档
asynchronous : bool [default: true]
此属性表示几何体生成是否应为异步。
diameter : real [default: 100]
yz 平面上的直径。
enableNormals : bool [default: true]
生成网格面法线
enableUV : bool [default: false]
生成网格 UV 坐标。
height : real [default: 100]
中间圆柱体在 x 轴上的高度,不包括半球。
latitudes : int [default: 16]
按倾角分布的纬度数。纬度数始终为偶数。
longitudes : int [default: 32]
按方位角分布的经度或经线数。
rings : int [default: 1]
半球之间圆柱体的截面数。
status : bool [read-only]
当异步为 true 时,此属性表示几何体生成的状态。
| 常量 | 说明 |
|---|---|
CapsuleGeometry.Null | 几何体生成尚未开始 |
CapsuleGeometry.Ready | 几何体生成已完成。 |
CapsuleGeometry.Loading | 几何体生成正在进行。 |
CapsuleGeometry.Error | 几何体生成失败。 |
uvProfile : UVProfile [default: CapsuleGeometry.Fixed]
UV 坐标沿胶囊长度分布的方式。
| 常数 | 说明 |
|---|---|
CapsuleGeometry.Fixed | UV 纹理的上三分之一为北半球,中间三分之一为圆柱体,最后三分之一为南半球。 |
CapsuleGeometry.Aspect | UV 与高度和半径的比例相匹配。 |
CapsuleGeometry.Uniform | 根据纬度与圆环的比例,统一所有 UV 单元的比例。 |
© 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.