PySide6.Qt3DCore.Qt3DCore.QEntity¶
- class QEntity¶
QEntityis aQNodesubclass that can aggregate severalQComponentinstances that will specify its behavior. More…Inherited by:
QCamera,QText2DEntity,QSkyboxEntity,QAbstractCameraController,QOrbitCameraController,QFirstPersonCameraControllerSynopsis¶
Methods¶
def
__init__()def
addComponent()def
components()def
parentEntity()
Note
This documentation may contain snippets that were automatically translated from C++ to Python. We always welcome contributions to the snippet translation. If you see an issue with the translation, you can also let us know by creating a ticket on https:/bugreports.qt.io/projects/PYSIDE
Detailed Description¶
By itself a
QEntityis an empty shell. The behavior of aQEntityobject is defined by theQComponentobjects it references. Each Qt3D backend aspect will be able to interpret and process an Entity by recognizing which components it is made up of. One aspect may decide to only process entities composed of a singleQTransformcomponent whilst another may focus onQMouseHandler.See also
QComponentQTransform- __init__([parent=None])¶
- Parameters:
parent –
QNode
Constructs a new
QEntityinstance withparentas parent.- addComponent(comp)¶
- Parameters:
comp –
QComponent
Adds a new reference to the component
comp.Note
If the
QComponenthas no parent, theQEntitywill set itself as its parent thereby taking ownership of the component.- components()¶
- Return type:
.list of Qt3DCore.QComponent
Returns the list of
QComponentinstances the entity is referencing.- parentEntity()¶
- Return type:
QEntity
Returns the parent
QEntityinstance of this entity. If the immediate parent isn’t aQEntity, this function traverses up the scene hierarchy until a parentQEntityis found. If noQEntityparent can be found, returns null.- removeComponent(comp)¶
- Parameters:
comp –
QComponent
Removes the reference to
comp.