QComponent#
The base class of scene nodes that can be aggregated by QEntity
instances as a component. More…
Inherited by: QShaderData, QSceneLoader, QRenderTarget, QRenderSettings, QObjectPicker, QMaterial, QTextureMaterial, QPhongMaterial, QPhongAlphaMaterial, QPerVertexColorMaterial, QNormalDiffuseSpecularMapMaterial, QNormalDiffuseMapMaterial, QNormalDiffuseMapAlphaMaterial, QMorphPhongMaterial, QMetalRoughMaterial, QGoochMaterial, QDiffuseSpecularMaterial, QDiffuseSpecularMapMaterial, QDiffuseMapMaterial, QLevelOfDetail, QLevelOfDetailSwitch, QLayer, QEnvironmentLight, QComputeCommand, QCameraLens, QAbstractRayCaster, QScreenRayCaster, QRayCaster, QAbstractLight, QSpotLight, QPointLight, QDirectionalLight, QFrameAction, QMouseHandler, QLogicalDevice, QKeyboardHandler, QInputSettings, QAxisAccumulator, QTransform, QCoreSettings, QBoundingVolume, QPickingProxy, QGeometryRenderer, QMesh, QTorusMesh, QSphereMesh, QPlaneMesh, QExtrudedTextMesh, QCylinderMesh, QCuboidMesh, QConeMesh, QArmature, QAbstractClipAnimator, QClipAnimator, QBlendedClipAnimator
Synopsis#
Functions#
def
entities
()def
isShareable
()
Slots#
def
setShareable
(isShareable)
Signals#
def
addedToEntity
(entity)def
removedFromEntity
(entity)def
shareableChanged
(isShareable)
Detailed Description#
A QComponent
provides a vertical slice of behavior that can be assigned to and sometimes shared across QEntity
instances.
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
, and QMaterial
components.
See also
QEntity
- class PySide6.Qt3DCore.Qt3DCore.QComponent([parent=None])#
- Parameters
parent –
PySide6.Qt3DCore.Qt3DCore.QNode
Constructs a new QComponent
instance with parent
as the parent.
Note
a QComponent
should never be instanced directly, instance one of the subclasses instead.
- PySide6.Qt3DCore.Qt3DCore.QComponent.addedToEntity(entity)#
- Parameters
entity –
PySide6.Qt3DCore.Qt3DCore.QEntity
Indicates that a reference has been added to entity
.
- PySide6.Qt3DCore.Qt3DCore.QComponent.entities()#
- Return type
Returns a QList
containing all the entities that reference this component.
- Return type
bool
Holds the shareable flag of the QComponent
. The QComponent
can be shared across several entities if true
.
- PySide6.Qt3DCore.Qt3DCore.QComponent.removedFromEntity(entity)#
- Parameters
entity –
PySide6.Qt3DCore.Qt3DCore.QEntity
Indicates that a reference has been removed from entity
.
- Parameters
isShareable – bool
Holds the shareable flag of the QComponent
. The QComponent
can be shared across several entities if true
.
- Parameters
isShareable – bool