Qt3DRender::QStencilOperationArguments Class
class Qt3DRender::QStencilOperationArgumentsQStencilOperationArguments 类用于设置在模板测试和深度测试失败时应采取的操作。更多内容...
| 头文件: | #include <qstenciloperationarguments.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3drender) target_link_libraries(mytarget PRIVATE Qt6::3drender) |
| qmake: | QT += 3drender |
| 在 QML 中: | StencilOperationArguments |
| 继承自: | QObject |
| 状态: | 已弃用 |
该类已弃用。我们强烈建议不要在新代码中使用它。
公共类型
| enum | FaceMode { Front, Back, FrontAndBack } |
| enum | Operation { Zero, Keep, Replace, Increment, Decrement, …, Invert } |
属性
- allTestsPassOperation : Operation
- depthTestFailureOperation : Operation
- faceMode : FaceMode
- stencilTestFailureOperation : Operation
公共函数
| Qt3DRender::QStencilOperationArguments::Operation | allTestsPassOperation() const |
| Qt3DRender::QStencilOperationArguments::Operation | depthTestFailureOperation() const |
| Qt3DRender::QStencilOperationArguments::FaceMode | faceMode() const |
| Qt3DRender::QStencilOperationArguments::Operation | stencilTestFailureOperation() const |
公共槽位
| void | setAllTestsPassOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
| void | setDepthTestFailureOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
| void | setStencilTestFailureOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
信号
| void | allTestsPassOperationChanged(Qt3DRender::QStencilOperationArguments::Operation stencilDepthPass) |
| void | depthTestFailureOperationChanged(Qt3DRender::QStencilOperationArguments::Operation depthFail) |
| void | faceModeChanged(Qt3DRender::QStencilOperationArguments::FaceMode faceMode) |
| void | stencilTestFailureOperationChanged(Qt3DRender::QStencilOperationArguments::Operation stencilFail) |
详细说明
Qt3DRender::QStencilOperationArguments 类指定了模板运算的参数。
另请参见 Qt3DRender::QStencilOperation 。
成员类型文档
enum QStencilOperationArguments::FaceMode
此枚举包含模板运算参数“面模式”的值
| 常量 | 值 | 描述 |
|---|---|---|
Qt3DRender::QStencilOperationArguments::Front | 0x0404 | 参数应用于朝向前面的多边形。 |
Qt3DRender::QStencilOperationArguments::Back | 0x0405 | 参数应用于背向多边形。 |
Qt3DRender::QStencilOperationArguments::FrontAndBack | 0x0408 | 参数同时应用于朝向前面的多边形和朝向后面的多边形。 |
enum QStencilOperationArguments::Operation
此枚举包含模板运算的值。
| 常量 | 值 | 描述 |
|---|---|---|
Qt3DRender::QStencilOperationArguments::Zero | 0 | 将模板值设置为零。 |
Qt3DRender::QStencilOperationArguments::Keep | 0x1E00 | 保留当前模板值。 |
Qt3DRender::QStencilOperationArguments::Replace | 0x1E01 | 用蒙版片段模板值替换。 |
Qt3DRender::QStencilOperationArguments::Increment | 0x1E02 | 将当前值按饱和度增量增加。 |
Qt3DRender::QStencilOperationArguments::Decrement | 0x1E03 | 以饱和度为基准递减当前值。 |
Qt3DRender::QStencilOperationArguments::IncrementWrap | 0x8507 | 使用“循环”对当前值进行递增。 |
Qt3DRender::QStencilOperationArguments::DecrementWrap | 0x8508 | 使用“环绕”减小当前值。 |
Qt3DRender::QStencilOperationArguments::Invert | 0x150A | 反转当前值。 |
属性文档
allTestsPassOperation : Operation
用于在深度测试和模板测试均通过时保留模板测试操作。默认值为 StencilOperationArguments.Keep。
访问函数:
| Qt3DRender::QStencilOperationArguments::Operation | allTestsPassOperation() const |
| void | setAllTestsPassOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
通知器信号:
| void | allTestsPassOperationChanged(Qt3DRender::QStencilOperationArguments::Operation stencilDepthPass) |
depthTestFailureOperation : Operation
在模板测试通过但深度测试失败时,保留模板测试操作。默认值为 StencilOperationArguments.Keep。
访问函数:
| Qt3DRender::QStencilOperationArguments::Operation | depthTestFailureOperation() const |
| void | setDepthTestFailureOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
通知信号:
| void | depthTestFailureOperationChanged(Qt3DRender::QStencilOperationArguments::Operation depthFail) |
[read-only] faceMode : FaceMode
保存应用参数的操作面。
访问函数:
| Qt3DRender::QStencilOperationArguments::FaceMode | faceMode() const |
通知器信号:
| void | faceModeChanged(Qt3DRender::QStencilOperationArguments::FaceMode faceMode) |
stencilTestFailureOperation : Operation
用于在模板测试失败时保留模板测试操作。默认值为 StencilOperationArguments.Keep。
访问函数:
| Qt3DRender::QStencilOperationArguments::Operation | stencilTestFailureOperation() const |
| void | setStencilTestFailureOperation(Qt3DRender::QStencilOperationArguments::Operation operation) |
通知信号:
| void | stencilTestFailureOperationChanged(Qt3DRender::QStencilOperationArguments::Operation stencilFail) |
© 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.