QConeGeometry 类
类 Qt3DExtras::QConeGeometryQConeGeometry 类允许在 3D 空间中创建圆锥体。 更多...
| 头文件 | #include <Qt3DExtras/QConeGeometry> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) | 
| qmake | QT += 3dextras | 
| 由以下实例化 | ConeGeometry | 
| 继承自 | Qt3DCore::QGeometry | 
属性
| 
 | 
 | 
公共函数
| float | bottomRadius() const | 
| bool | hasBottomEndcap() const | 
| bool | hasTopEndcap() const | 
| Qt3DCore::QAttribute * | indexAttribute() const | 
| float | length() const | 
| Qt3DCore::QAttribute * | normalAttribute() const | 
| Qt3DCore::QAttribute * | positionAttribute() const | 
| int | rings() const | 
| int | slices() const | 
| Qt3DCore::QAttribute * | texCoordAttribute() const | 
| float | topRadius() const | 
| void | updateIndices() | 
| void | updateVertices() | 
公共槽
| void | setBottomRadius(float bottomRadius) | 
| void | setHasBottomEndcap(bool hasBottomEndcap) | 
| void | setHasTopEndcap(bool hasTopEndcap) | 
| void | setLength(float length) | 
| void | setRings(int rings) | 
| void | setSlices(int slices) | 
| void | setTopRadius(float topRadius) | 
信号
| void | bottomRadiusChanged(浮点型 bottomRadius) | 
| void | hasBottomEndcapChanged(布尔型 hasBottomEndcap) | 
| void | hasTopEndcapChanged(布尔型 hasTopEndcap) | 
| void | lengthChanged(浮点型 length) | 
| void | ringsChanged(整数 rings) | 
| void | slicesChanged(整数 slices) | 
| void | topRadiusChanged(浮点型 topRadius) | 
详细描述
QConeGeometry 类最常由 QConeMesh 内部使用,但也可以用于自定义 Qt3DRender::QGeometryRenderer 子类。该类允许创建锥形和截头锥。
属性文档
bottomRadius : 浮点型
保存锥形的底部半径。
访问函数
| float | bottomRadius() const | 
| void | setBottomRadius(浮点型 bottomRadius) | 
通知信号
| void | bottomRadiusChanged(浮点型 bottomRadius) | 
hasBottomEndcap : 布尔型
确定锥形底部是封闭的还是开放的。
访问函数
| bool | hasBottomEndcap() const | 
| void | setHasBottomEndcap(布尔型 hasBottomEndcap) | 
通知信号
| void | hasBottomEndcapChanged(布尔型 hasBottomEndcap) | 
hasTopEndcap : 布尔型
确定锥形顶部是封闭的还是开放的。
访问函数
| bool | hasTopEndcap() const | 
| void | setHasTopEndcap(布尔型 hasTopEndcap) | 
通知信号
| void | hasTopEndcapChanged(布尔型 hasTopEndcap) | 
[只读] indexAttribute : Qt3DCore::QAttribute* const
保存几何索引属性。
访问函数
| Qt3DCore::QAttribute * | indexAttribute() const | 
length : 浮点型
保存锥形的长度。
访问函数
| float | length() const | 
| void | setLength(浮点型 length) | 
通知信号
| void | lengthChanged(浮点型 length) | 
[只读] normalAttribute : Qt3DCore::QAttribute* const
保存几何法线属性。
访问函数
| Qt3DCore::QAttribute * | normalAttribute() const | 
[只读] positionAttribute : Qt3DCore::QAttribute* const
保存几何位置属性。
访问函数
| Qt3DCore::QAttribute * | positionAttribute() const | 
rings : 整数
保存几何中的圆环数量。
访问函数
| int | rings() const | 
| void | setRings(整数 rings) | 
通知信号
| void | ringsChanged(整数 rings) | 
slices : 整数
保存几何中的切片数量。
访问函数
| int | slices() const | 
| void | setSlices(int slices) | 
通知信号
| void | slicesChanged(int slices) | 
[只读] texCoordAttribute : Qt3DCore::QAttribute* const
存储几何纹理坐标属性。
访问函数
| Qt3DCore::QAttribute * | texCoordAttribute() const | 
topRadius : float
存储圆锥的顶部半径。
访问函数
| float | topRadius() const | 
| void | setTopRadius(float topRadius) | 
通知信号
| void | topRadiusChanged(float topRadius) | 
© 2024 The Qt Company Ltd. 本文档的贡献版权属于各自的拥有者。本文档是在自由软件基金会发布的GNU自由文档许可证1.3版的条款下提供的。Qt及其相关标志是The Qt Company Ltd.在芬兰和/或世界各地的注册商标。所有其他商标均为其各自所有者的财产。