|CMake:||find_package(Qt6 REQUIRED COMPONENTS 3dcore)
target_link_libraries(mytarget PRIVATE Qt6::3dcore)
|qmake:||QT += 3dcore|
|QAspectEngine(QObject *parent = nullptr)|
|Qt3DCore::QAbstractAspect *||aspect(const QString &name) const|
|QList<Qt3DCore::QAbstractAspect *>||aspects() const|
|QVariant||executeCommand(const QString &command)|
|void||registerAspect(const QString &name)|
|void||unregisterAspect(const QString &name)|
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.
Constructs a new QAspectEngine with parent.
Destroys the engine.
Returns the asepect matching the name
Note: Required that the aspect was registered by name
Returns the aspects owned by the aspect engine.
Executes the given command on aspect engine. Valid commands are:
Returns the reply for the command.
If using the manual run mode, this function executes the jobs for each aspect. It is blocking and won't return until all jobs have been completed.
If you are using the QRenderAspect,
Registers a new aspect to the AspectManager. The QAspectEngine takes ownership of the aspect and will delete it when the aspect is unregistered.
Registers a new aspect to the AspectManager based on its name Uses the currently set aspect factory to create the actual aspect instance.
Returns the root entity of the aspect engine.
See also setRootEntity().
Sets the root entity for the aspect engine.
See also rootEntity().
Unregisters and deletes the given aspect.
Unregisters and deletes the aspect with the given name.
A shared pointer for QEntity.