QCullFace

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

Inheritance diagram of PySide6.Qt3DRender.Qt3DRender.QCullFace

Synopsis

Functions

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.

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()

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

modeCullingMode

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

modeCullingMode

See also

mode()