QAspectEngine Class

class Qt3DCore::QAspectEngine

Responsible for handling all the QAbstractAspect subclasses that have been registered with the scene. More...

Header: #include <Qt3DCore/QAspectEngine>
qmake: QT += 3dcore
Inherits: QObject
typedef QEntityPtr

Detailed Description

The Qt3D run loop is controlled by the Qt3DRender::QAspectEngine.

Qt3DCore::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 Qt3DCore::QEntity is set on the Qt3DCore::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.

Related Non-Members

typedef QEntityPtr

A shared pointer for QEntity.