QCullFace#

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

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QCullFace

Synopsis#

Properties#

Functions#

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 PySide6.Qt3DRender.Qt3DRender.QCullFace([parent=None])#
Parameters:

parentPySide6.Qt3DCore.Qt3DCore.QNode

Constructs a new QCullFace instance with parent as parent.

Note

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

property PᅟySide6.Qt3DRender.Qt3DRender.QCullFace.mode: CullingMode#

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

Access functions:
PySide6.Qt3DRender.Qt3DRender.QCullFace.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

PySide6.Qt3DRender.Qt3DRender.QCullFace.mode()#
Return type:

CullingMode

See also

setMode()

Getter of property mode .

PySide6.Qt3DRender.Qt3DRender.QCullFace.modeChanged(mode)#
Parameters:

modeCullingMode

Notification signal of property mode .

PySide6.Qt3DRender.Qt3DRender.QCullFace.setMode(mode)#
Parameters:

modeCullingMode

See also

mode()

Setter of property mode .