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]
当“asynchronous”为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.