Qt3DExtras::QPlaneGeometry Class
class Qt3DExtras::QPlaneGeometryQPlaneGeometry 类允许在三维空间中创建平面。更多
Header: | #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()
根据网格分辨率、宽度和高度属性更新顶点。
© 2025 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.