QCullFace

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

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QCullFace

Synopsis

Functions

Slots

Signals

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 PySide2.Qt3DRender.Qt3DRender.QCullFace([parent=None])

Constructs a new QCullFace instance with parent as parent.

PySide2.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

PySide2.Qt3DRender.Qt3DRender.QCullFace.mode()
Return type:

CullingMode

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

PySide2.Qt3DRender.Qt3DRender.QCullFace.modeChanged(mode)
Parameters:

modeCullingMode

PySide2.Qt3DRender.Qt3DRender.QCullFace.setMode(mode)
Parameters:

modeCullingMode

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