内容表

上一话题

Qt3DCore.QBackendNode

下一话题

Qt3DCore.QComponentAddedChange

Qt3DCore.QComponent

The base class of scene nodes that can be aggregated by QEntity instances as a component. 更多

Inheritance diagram of PySide2.Qt3DCore.Qt3DCore.QComponent

继承者: Qt3DAnimation.QAbstractClipAnimator , Qt3DAnimation.QBlendedClipAnimator , Qt3DAnimation.QClipAnimator , Qt3DCore.QArmature , Qt3DCore.QTransform , Qt3DExtras.QConeMesh , Qt3DExtras.QCuboidMesh , Qt3DExtras.QCylinderMesh , Qt3DExtras.QDiffuseMapMaterial , Qt3DExtras.QDiffuseSpecularMapMaterial , Qt3DExtras.QDiffuseSpecularMaterial , Qt3DExtras.QExtrudedTextMesh , Qt3DExtras.QGoochMaterial , Qt3DExtras.QMetalRoughMaterial , Qt3DExtras.QMorphPhongMaterial , Qt3DExtras.QNormalDiffuseMapMaterial , Qt3DExtras.QNormalDiffuseSpecularMapMaterial , Qt3DExtras.QPerVertexColorMaterial , Qt3DExtras.QPhongAlphaMaterial , Qt3DExtras.QPhongMaterial , Qt3DExtras.QPlaneMesh , Qt3DExtras.QSphereMesh , Qt3DExtras.QTextureMaterial , Qt3DExtras.QTorusMesh , Qt3DInput.QAxisAccumulator , Qt3DInput.QInputSettings , Qt3DInput.QKeyboardHandler , Qt3DInput.QLogicalDevice , Qt3DInput.QMouseHandler , Qt3DLogic.QFrameAction , Qt3DRender.QAbstractLight , Qt3DRender.QAbstractRayCaster , Qt3DRender.QCameraLens , Qt3DRender.QComputeCommand , Qt3DRender.QDirectionalLight , Qt3DRender.QEnvironmentLight , Qt3DRender.QGeometryRenderer , Qt3DRender.QLayer , Qt3DRender.QLevelOfDetail , Qt3DRender.QLevelOfDetailSwitch , Qt3DRender.QMaterial , Qt3DRender.QMesh , Qt3DRender.QObjectPicker , Qt3DRender.QPointLight , Qt3DRender.QRayCaster , Qt3DRender.QRenderSettings , Qt3DRender.QRenderTarget , Qt3DRender.QSceneLoader , Qt3DRender.QScreenRayCaster , Qt3DRender.QShaderData , Qt3DRender.QSpotLight

概要

函数

信号

详细描述

A QComponent provides a vertical slice of behavior that can be assigned to and sometimes shared across QEntity 实例。

QComponent subclasses are often aggregated in groups that impart useful behavior to the aggregating entity. For example, to have an Entity that gets drawn by the Qt3D renderer aspect, an entity would most likely aggregate QTransform , QMesh ,和 QMaterial components.

另请参阅

QEntity

class PySide2.Qt3DCore.Qt3DCore. QComponent ( [ parent=None ] )
param parent

QNode

构造新 QComponent 实例与 parent as the parent.

注意

a QComponent should never be instanced directly, instance one of the subclasses instead.

PySide2.Qt3DCore.Qt3DCore.QComponent. addedToEntity ( entity )
参数

entity QEntity

PySide2.Qt3DCore.Qt3DCore.QComponent. entities ( )
返回类型

返回 QVector containing all the entities that reference this component.

PySide2.Qt3DCore.Qt3DCore.QComponent. isShareable ( )
返回类型

bool

PySide2.Qt3DCore.Qt3DCore.QComponent. removedFromEntity ( entity )
参数

entity QEntity

PySide2.Qt3DCore.Qt3DCore.QComponent. setShareable ( isShareable )
参数

isShareable bool

另请参阅

isShareable()

PySide2.Qt3DCore.Qt3DCore.QComponent. shareableChanged ( isShareable )
参数

isShareable bool