内容表

上一话题

Qt3DRender.QComputeCommand

下一话题

Qt3DRender.QDepthTest

Qt3DRender.QCullFace

QCullFace class specifies whether front or back face culling is enabled. 更多

Inheritance diagram of PySide2.Qt3DRender.Qt3DRender.QCullFace

概要

函数

信号

详细描述

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

另请参阅

QFrontFace

class PySide2.Qt3DRender.Qt3DRender. QCullFace ( [ parent=None ] )
param parent

QNode

构造新 QCullFace 实例与 parent 作为父级。

PySide2.Qt3DRender.Qt3DRender.QCullFace. CullingMode

This enumeration specifies values for the culling mode.

常量

描述

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 ( )
返回类型

CullingMode

另请参阅

setMode()

PySide2.Qt3DRender.Qt3DRender.QCullFace. modeChanged ( mode )
参数

mode CullingMode

PySide2.Qt3DRender.Qt3DRender.QCullFace. setMode ( mode )
参数

mode CullingMode

另请参阅

mode()