内容表

上一话题

Qt3DCore.QArmature

下一话题

Qt3DCore.QAspectJob

Qt3DCore.QAspectEngine

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

Inheritance diagram of PySide2.Qt3DCore.Qt3DCore.QAspectEngine

概要

函数

详细描述

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.

class PySide2.Qt3DCore.Qt3DCore. QAspectEngine ( [ parent=None ] )
param parent

QObject

构造新 QAspectEngine with parent .

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. RunMode

New in version 5.14.

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. aspects ( )
返回类型

Returns the aspects owned by the aspect engine.

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. executeCommand ( command )
参数

command – unicode

返回类型

object

Executes the given command on aspect engine. Valid commands are:

  • “list 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’t return until all jobs have been completed.

If you are using the QRenderAspect,

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. registerAspect ( aspect )
参数

aspect QAbstractAspect

Registers a new aspect to the AspectManager. The QAspectEngine takes ownership of the aspect and will delete it when the aspect is unregistered.

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. registerAspect ( name )
参数

name – unicode

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. rootEntity ( )
返回类型

QSharedPointer

Returns the root entity of the aspect engine.

另请参阅

setRootEntity()

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. runMode ( )
返回类型

RunMode

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. setRootEntity ( root )
参数

root QSharedPointer

设置 root entity for the aspect engine.

另请参阅

rootEntity()

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. setRunMode ( mode )
参数

mode RunMode

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. unregisterAspect ( aspect )
参数

aspect QAbstractAspect

Unregisters and deletes the given aspect .

PySide2.Qt3DCore.Qt3DCore.QAspectEngine. unregisterAspect ( name )
参数

name – unicode