class QCullFace

The QCullFace class specifies whether front or back face culling is enabled. More

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QCullFace

Synopsis

Properties

Methods

Slots

Signals

Note

This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE

Detailed Description

QCullFace sets whether the front or back facets are culled. Facets include triangles, quadrilaterals, polygons and rectangles.

It can be added by calling the addRenderState() method on a QRenderPass :

// using namespace Qt3DRender;

QRenderPass *renderPass = new QRenderPass();

// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);

// Add the render state to the render pass
renderPass->addRenderState(cullFront);

Or by calling the addRenderState() method on a QRenderStateSet :

// using namespace Qt3DRender;

QRenderStateSet *renderStateSet = new QRenderStateSet();

// Create a front face culling render state
QCullFace *cullFront = new QCullFace();
cullFront->setMode(QCullFace::Front);

// Add the render state to the render pass
renderStateSet->addRenderState(cullFront);

See also

QFrontFace

class CullingMode

This enumeration specifies values for the culling mode.

Constant

Description

Qt3DRender.QCullFace.NoCulling

Culling is disabled

Qt3DRender.QCullFace.Front

Culling is enabled for front facing polygons

Qt3DRender.QCullFace.Back

Culling is enabled for back facing polygons

Qt3DRender.QCullFace.FrontAndBack

Culling is enabled for all polygons, points and lines are drawn

Note

Properties can be used directly when from __feature__ import true_property is used or via accessor functions otherwise.

property modeᅟ: Qt3DRender.QCullFace.CullingMode

Holds the culling mode used by QCullFace . Default is set to QCullFace .Back.

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

parentQNode

Constructs a new QCullFace instance with parent as parent.

mode()
Return type:

CullingMode

See also

setMode()

Getter of property modeᅟ .

modeChanged(mode)
Parameters:

modeCullingMode

Notification signal of property modeᅟ .

setMode(mode)
Parameters:

modeCullingMode

See also

mode()

Setter of property modeᅟ .