QPlaneGeometry 类
class Qt3DExtras::QPlaneGeometryQPlaneGeometry 类允许在 3D 空间中创建平面。 更多...
| 头文件 | #include <Qt3DExtras/QPlaneGeometry> | 
| CMake | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) | 
| qmake | QT += 3dextras | 
| 实例化 | PlaneGeometry | 
| 继承 | Qt3DCore::QGeometry | 
属性
| 
 | 
 | 
公开函数
| QPlaneGeometry(Qt3DCore::QNode *parent = nullptr) | |
| float | height() const | 
| Qt3DCore::QAttribute * | indexAttribute() const | 
| bool | mirrored() const | 
| Qt3DCore::QAttribute * | normalAttribute() const | 
| Qt3DCore::QAttribute * | positionAttribute() const | 
| QSize | resolution() const | 
| Qt3DCore::QAttribute * | tangentAttribute() const | 
| Qt3DCore::QAttribute * | texCoordAttribute() const | 
| void | updateIndices() | 
| void | updateVertices() | 
| float | width() const | 
公开槽
| void | setHeight(float height) | 
| void | setMirrored(bool mirrored) | 
| void | setResolution(const QSize &resolution) | 
| void | setWidth(float width) | 
信号
| void | heightChanged(float height) | 
| void | mirroredChanged(bool mirrored) | 
| void | resolutionChanged(const QSize &resolution) | 
| void | widthChanged(float width) | 
详细描述
QPlaneGeometry类通常在内部由QPlaneMesh使用,但也可以用于自定义的Qt3DRender::QGeometryRenderer子类。
属性文档
height : float
保存平面高度。
访问函数
| float | height() const | 
| void | setHeight(float height) | 
通知信号
| void | heightChanged(float height) | 
[只读] indexAttribute : Qt3DCore::QAttribute* const
保存几何索引属性。
访问函数
| Qt3DCore::QAttribute * | indexAttribute() const | 
mirrored : bool
控制平面的UV坐标是否垂直翻转。
访问函数
| bool | mirrored() const | 
| void | setMirrored(bool mirrored) | 
通知信号
| void | mirroredChanged(bool mirrored) | 
[只读] normalAttribute : Qt3DCore::QAttribute* const
保存几何法线属性。
访问函数
| Qt3DCore::QAttribute * | normalAttribute() const | 
[只读] positionAttribute : Qt3DCore::QAttribute* const
保存几何位置属性。
访问函数
| Qt3DCore::QAttribute * | positionAttribute() const | 
resolution : QSize
保存平面分辨率。
访问函数
| QSize | resolution() const | 
| void | setResolution(const QSize &resolution) | 
通知信号
| void | resolutionChanged(const QSize &resolution) | 
[只读] tangentAttribute : Qt3DCore::QAttribute* const
保存几何切线属性。
访问函数
| Qt3DCore::QAttribute * | tangentAttribute() const | 
[只读] texCoordAttribute : Qt3DCore::QAttribute* const
保存几何纹理坐标属性。
访问函数
| Qt3DCore::QAttribute * | texCoordAttribute() const | 
width : float
保存平面宽度。
访问函数
| float | width() const | 
| void | setWidth(float width) | 
通知信号
| void | widthChanged(float width) | 
成员函数文档
[显式] QPlaneGeometry::QPlaneGeometry(Qt3DCore::QNode *parent = nullptr)
使用父节点构造一个新的QPlaneGeometry。
void QPlaneGeometry::updateIndices()
根据网格分辨率更新索引。
void QPlaneGeometry::updateVertices()
根据网格分辨率、宽度和高度属性更新顶点。
© 2024 The Qt Company Ltd. 本文件中包含的文档贡献归各自所有者所有。提供的文档受GNU Free Documentation License 1.3 版许可的约束,该许可证由自由软件基金会发布。Qt及其对应标志是The Qt Company Ltd. 在芬兰及世界其他国家/地区的商标。所有其他商标均为各自所有者的财产。