Qt3DExtras::QPlaneGeometry Class
class Qt3DExtras::QPlaneGeometryQPlaneGeometry 类允许在三维空间中创建一个平面。更多内容...
| 头文件: | #include <Qt3DExtras/QPlaneGeometry> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| 在 QML 中: | 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) |
[read-only] indexAttribute : Qt3DCore::QAttribute* const
存储几何索引属性。
访问函数:
| Qt3DCore::QAttribute * | indexAttribute() const |
mirrored : bool
控制平面的 UV 坐标是否应进行垂直翻转。
访问函数:
| bool | mirrored() const |
| void | setMirrored(bool mirrored) |
通知信号:
| void | mirroredChanged(bool mirrored) |
[read-only] normalAttribute : Qt3DCore::QAttribute* const
存储几何体的法线属性。
访问函数:
| Qt3DCore::QAttribute * | normalAttribute() const |
[read-only] positionAttribute : Qt3DCore::QAttribute* const
存储几何位置属性。
访问函数:
| Qt3DCore::QAttribute * | positionAttribute() const |
resolution : QSize
保存平面分辨率。
访问函数:
| QSize | resolution() const |
| void | setResolution(const QSize &resolution) |
通知信号:
| void | resolutionChanged(const QSize &resolution) |
[read-only] tangentAttribute : Qt3DCore::QAttribute* const
存储几何体的切线属性。
访问函数:
| Qt3DCore::QAttribute * | tangentAttribute() const |
[read-only] texCoordAttribute : Qt3DCore::QAttribute* const
存储几何体纹理坐标属性。
访问函数:
| Qt3DCore::QAttribute * | texCoordAttribute() const |
width : float
保存平面宽度。
访问函数:
| float | width() const |
| void | setWidth(float width) |
通知信号:
| void | widthChanged(float width) |
成员函数文档
[explicit] QPlaneGeometry::QPlaneGeometry(Qt3DCore::QNode *parent = nullptr)
使用parent 创建一个新的QPlaneGeometry。
void QPlaneGeometry::updateIndices()
根据网格分辨率更新索引。
void QPlaneGeometry::updateVertices()
根据网格分辨率、宽度及高度属性更新顶点。
© 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.