Qt3DRender::QStencilMask Class
class Qt3DRender::QStencilMaskQStencilMask 类用于控制模板平面中各个位的正面和背面写入操作。更多内容...
| 头文件: | #include <qstencilmask.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 在 QML 中: | StencilMask |
| 继承自: | Qt3DRender::QRenderState |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
属性
- backOutputMask : uint
- frontOutputMask : uint
公共函数
| QStencilMask(Qt3DCore::QNode *parent = nullptr) | |
| uint | backOutputMask() const |
| uint | frontOutputMask() const |
公共槽位
| void | setBackOutputMask(uint backOutputMask) |
| void | setFrontOutputMask(uint frontOutputMask) |
信号
| void | backOutputMaskChanged(uint backOutputMask) |
| void | frontOutputMaskChanged(uint frontOutputMask) |
详细说明
Qt3DRender::QStencilMask 类用于指定在模板测试后对模板值应用的写入掩码。可以分别针对朝向前面的多边形和朝向后面的多边形指定掩码。片元模板值在写入模板缓冲区之前,会与该掩码进行按位与运算。
另请参阅 Qt3DRender::QStencilTest 。
属性文档
backOutputMask : uint
保存面向后方的多边形片段模板值的写入掩码。
访问函数:
| uint | backOutputMask() const |
| void | setBackOutputMask(uint backOutputMask) |
通知信号:
| void | backOutputMaskChanged(uint backOutputMask) |
frontOutputMask : uint
存储面向前多边形片段模板值的写入掩码。
访问函数:
| uint | frontOutputMask() const |
| void | setFrontOutputMask(uint frontOutputMask) |
通知信号:
| void | frontOutputMaskChanged(uint frontOutputMask) |
成员函数文档
[explicit] QStencilMask::QStencilMask(Qt3DCore::QNode *parent = nullptr)
该构造函数使用指定的parent 创建一个新的QStencilMask::QStencilMask 实例。
© 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.