QAspectEngine — PyQt Documentation v5.15.7 (original) (raw)
PyQt5.Qt3DCore.QAspectEngine
Inherits from QObject.
Description¶
Responsible for handling all the QAbstractAspect subclasses that have been registered with the scene.
The Qt3D run loop is controlled by the Qt3DRender::QAspectEngine.
QAbstractAspect subclasses 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 QEntity is set on the QAspectEngine. 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.
Enums¶
RunMode
TODO
Member | Value | Description |
---|---|---|
Automatic | TODO | TODO |
Manual | TODO | TODO |
Methods¶
__init__(parent: QObject = None)
Constructs a new QAspectEngine with parent.
aspects() → List[QAbstractAspect]
Returns the aspects owned by the aspect engine.
executeCommand(str) → Any
Executes the given command on aspect engine. Valid commands are:
- “list aspects”
Returns the reply for the command.
processFrame()
TODO
registerAspect(QAbstractAspect)
Registers a new aspect to the AspectManager. The QAspectEngine takes ownership of the aspect and will delete it when the aspect is unregistered.
registerAspect(str)
Registers a new aspect to the AspectManager based on its name Uses the currently set aspect factory to create the actual aspect instance.
rootEntity() → QEntity
Returns the root entity of the aspect engine.
See also
runMode() → RunMode
TODO
setRootEntity(QEntity)
Sets the root entity for the aspect engine.
setRunMode(RunMode)
TODO
unregisterAspect(QAbstractAspect)
Unregisters and deletes the given aspect.
unregisterAspect(str)
Unregisters and deletes the aspect with the given name.