QAspectEngine露
Responsible for handling all the
QAbstractAspectsubclasses that have been registered with the scene. More鈥

Synopsis露
Functions露
def
aspects()def
executeCommand(command)def
processFrame()def
registerAspect(aspect)def
registerAspect(name)def
rootEntity()def
runMode()def
setRootEntity(root)def
setRunMode(mode)def
unregisterAspect(aspect)def
unregisterAspect(name)
Detailed Description露
The Qt3D run loop is controlled by the Qt3DRender::QAspectEngine.
QAbstractAspectsubclasses can be registered by calling Qt3DCore::QAspectEngine::registerAspect() which will take care of registering the aspect and in turn that will call Qt3DCore::QAbstractAspect::onRegistered();The simulation loop is launched as soon as a root
QEntityis set on theQAspectEngine. This is followed by a call to onEngineStartup() on each aspect so that they can start their simulation work.The simulation loop is stopped when the root entity is set to Qt3DCore::QEntityPtr(). This calls onEngineShutdown() on each aspect so that they can stop performing their simulation work.
Setting a new valid root entity would restart the simulation loop again.
- class PySide2.Qt3DCore.Qt3DCore.QAspectEngine([parent=None])露
- param parent:
Constructs a new
QAspectEnginewithparent.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.RunMode露
New in version 5.14.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.aspects()露
- Return type:
Returns the aspects owned by the aspect engine.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.executeCommand(command)露
- Parameters:
command 鈥 str
- Return type:
object
Executes the given
commandon aspect engine. Valid commands are:鈥渓ist aspects鈥
Returns the reply for the command.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.processFrame()露
If using the manual run mode, this function executes the jobs for each aspect. It is blocking and won鈥檛 return until all jobs have been completed.
If you are using the QRenderAspect,
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.registerAspect(aspect)露
- Parameters:
Registers a new
aspectto the AspectManager. TheQAspectEnginetakes ownership of the aspect and will delete it when the aspect is unregistered.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.registerAspect(name)
- Parameters:
name 鈥 str
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.rootEntity()露
- Return type:
QSharedPointer
Returns the root entity of the aspect engine.
See also
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.setRootEntity(root)露
- Parameters:
root 鈥
QSharedPointer
Sets the
rootentity for the aspect engine.See also
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.unregisterAspect(aspect)露
- Parameters:
Unregisters and deletes the given
aspect.
- PySide2.Qt3DCore.Qt3DCore.QAspectEngine.unregisterAspect(name)
- Parameters:
name 鈥 str
漏 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.