QStencilTestArguments Class

class Qt3DRender::QStencilTestArguments

The QStencilTestArguments class specifies arguments for stencil test. More...

Header: #include <QStencilTestArguments>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3drender)
target_link_libraries(mytarget PRIVATE Qt6::3drender)
qmake: QT += 3drender
Instantiated By: StencilTestArguments
Inherits: QObject

Public Types

enum StencilFaceMode { Front, Back, FrontAndBack }
enum StencilFunction { Never, Always, Less, LessOrEqual, Equal, …, NotEqual }

Properties

Public Functions

uint comparisonMask() const
Qt3DRender::QStencilTestArguments::StencilFaceMode faceMode() const
int referenceValue() const
Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction() const

Public Slots

void setComparisonMask(uint comparisonMask)
void setReferenceValue(int referenceValue)
void setStencilFunction(Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction)

Signals

void comparisonMaskChanged(uint comparisonMask)
void faceModeChanged(Qt3DRender::QStencilTestArguments::StencilFaceMode faceMode)
void referenceValueChanged(int referenceValue)
void stencilFunctionChanged(Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction)

Detailed Description

The Qt3DRender::QStencilTestArguments class specifies the arguments for the stencil test.

Member Type Documentation

enum QStencilTestArguments::StencilFaceMode

This enumeration holds the values for stencil test arguments face modes

ConstantValueDescription
Qt3DRender::QStencilTestArguments::Front0x0404Arguments are applied to front-facing polygons.
Qt3DRender::QStencilTestArguments::Back0x0405Arguments are applied to back-facing polygons.
Qt3DRender::QStencilTestArguments::FrontAndBack0x0408Arguments are applied to both front- and back-facing polygons.

enum QStencilTestArguments::StencilFunction

Enumeration for the stencil function values

ConstantValueDescription
Qt3DRender::QStencilTestArguments::Never0x0200Never pass stencil test
Qt3DRender::QStencilTestArguments::Always0x0207Always pass stencil test
Qt3DRender::QStencilTestArguments::Less0x0201Pass stencil test if fragment stencil is less than reference value
Qt3DRender::QStencilTestArguments::LessOrEqual0x0203Pass stencil test if fragment stencil is less than or equal to reference value
Qt3DRender::QStencilTestArguments::Equal0x0202Pass stencil test if fragment stencil is equal to reference value
Qt3DRender::QStencilTestArguments::GreaterOrEqual0x0206Pass stencil test if fragment stencil is greater than or equal to reference value
Qt3DRender::QStencilTestArguments::Greater0x0204Pass stencil test if fragment stencil is greater than reference value
Qt3DRender::QStencilTestArguments::NotEqual0x0205Pass stencil test if fragment stencil is not equal to reference value

Property Documentation

comparisonMask : uint

Holds the stencil test comparison mask. Default is all zeroes.

Access functions:

uint comparisonMask() const
void setComparisonMask(uint comparisonMask)

Notifier signal:

void comparisonMaskChanged(uint comparisonMask)

[read-only] faceMode : const StencilFaceMode

Holds the faces the arguments are applied to.

Access functions:

Qt3DRender::QStencilTestArguments::StencilFaceMode faceMode() const

Notifier signal:

void faceModeChanged(Qt3DRender::QStencilTestArguments::StencilFaceMode faceMode)

referenceValue : int

Holds the stencil test reference value. Default is zero.

Access functions:

int referenceValue() const
void setReferenceValue(int referenceValue)

Notifier signal:

void referenceValueChanged(int referenceValue)

stencilFunction : StencilFunction

Holds the stencil test function. Default is Never.

Access functions:

Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction() const
void setStencilFunction(Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction)

Notifier signal:

void stencilFunctionChanged(Qt3DRender::QStencilTestArguments::StencilFunction stencilFunction)

See also Qt3DRender::QStencilTestArguments::StencilFunction.