QEntity¶
QEntityis aQNodesubclass that can aggregate severalQComponentinstances that will specify its behavior. More…

Inherited by: QAbstractCameraController, QFirstPersonCameraController, QOrbitCameraController, QSkyboxEntity, QText2DEntity, QCamera
Synopsis¶
Functions¶
def
addComponent(comp)def
components()def
parentEntity()def
removeComponent(comp)
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
- class PySide2.Qt3DCore.Qt3DCore.QEntity([parent=None])¶
- param parent:
Constructs a new
QEntityinstance withparentas parent.
- PySide2.Qt3DCore.Qt3DCore.QEntity.addComponent(comp)¶
- Parameters:
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.
- PySide2.Qt3DCore.Qt3DCore.QEntity.components()¶
- Return type:
Returns the list of
QComponentinstances the entity is referencing.
- PySide2.Qt3DCore.Qt3DCore.QEntity.parentEntity()¶
- Return type:
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.
- PySide2.Qt3DCore.Qt3DCore.QEntity.removeComponent(comp)¶
- Parameters:
Removes the reference to
comp.
© 2022 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.