PySide6.Qt3DRender.Qt3DRender.QPolygonOffset

class QPolygonOffset

QPolygonOffset 类设置用于计算多边形偏移深度值的比例和步长。更多

PySide6.Qt3DRender.Qt3DRender.QPolygonOffset 的继承图

概要

属性

方法

插槽

信号

注意

本文档可能包含从C++自动翻译到Python的代码片段。我们始终欢迎对代码片段翻译的贡献。如果您发现翻译问题,您也可以通过在我们的https:/bugreports.qt.io/projects/PYSIDE上创建工单来告知我们。

详细描述

一个QPolygonOffset类在深度测试和深度写入之前向片段深度值添加一个偏移量。该偏移量可用于在渲染具有非常接近深度值的多边形(如贴花)时避免z-fighting。

注意

当使用from __feature__ import true_property时,属性可以直接使用,否则通过访问器函数使用。

property depthStepsᅟ: float

保存创建恒定深度偏移的单位。默认值为0。

Access functions:
property scaleFactorᅟ: float

保存用于为每个多边形创建可变深度偏移的比例因子。默认值为0。

Access functions:
__init__([parent=None])
Parameters:

parentQNode

构造函数创建一个新的QPolygonOffset实例,并指定parent

depthSteps()
Return type:

浮点数

另请参阅

setDepthSteps()

属性 depthStepsᅟ 的获取器。

depthStepsChanged(depthSteps)
Parameters:

depthSteps – 浮点数

属性 depthStepsᅟ 的通知信号。

scaleFactor()
Return type:

浮点数

另请参阅

setScaleFactor()

属性 scaleFactorᅟ 的获取器。

scaleFactorChanged(scaleFactor)
Parameters:

scaleFactor – 浮点数

属性 scaleFactorᅟ 的通知信号。

setDepthSteps(depthSteps)
Parameters:

depthSteps – 浮点数

另请参阅

depthSteps()

属性 depthStepsᅟ 的设置器。

setScaleFactor(scaleFactor)
Parameters:

scaleFactor – 浮点数

另请参阅

scaleFactor()

属性 scaleFactorᅟ 的设置器。