[][src]Struct qt_3d_core::QAspectEngine

#[repr(C)]
pub struct QAspectEngine { /* fields omitted */ }

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

C++ class: Qt3DCore::QAspectEngine.

C++ documentation:

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

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.

Methods

impl QAspectEngine[src]

pub unsafe fn aspects(&self) -> CppBox<QVectorOfQAbstractAspect>[src]

Returns the aspects owned by the aspect engine.

Calls C++ function: QVector<Qt3DCore::QAbstractAspect*> Qt3DCore::QAspectEngine::aspects() const.

C++ documentation:

Returns the aspects owned by the aspect engine.

pub unsafe fn execute_command(
    &mut self,
    command: impl CastInto<Ref<QString>>
) -> CppBox<QVariant>
[src]

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

Calls C++ function: QVariant Qt3DCore::QAspectEngine::executeCommand(const QString& command).

C++ documentation:

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

  • "list aspects"

Returns the reply for the command.

pub unsafe fn meta_object(&self) -> Ptr<QMetaObject>[src]

Calls C++ function: virtual const QMetaObject* Qt3DCore::QAspectEngine::metaObject() const.

pub unsafe fn new_1a(
    parent: impl CastInto<MutPtr<QObject>>
) -> CppBox<QAspectEngine>
[src]

Constructs a new QAspectEngine with parent.

Calls C++ function: [constructor] void Qt3DCore::QAspectEngine::QAspectEngine(QObject* parent = …).

C++ documentation:

Constructs a new QAspectEngine with parent.

pub unsafe fn new_0a() -> CppBox<QAspectEngine>[src]

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

Calls C++ function: [constructor] void Qt3DCore::QAspectEngine::QAspectEngine().

C++ documentation:

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

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.

pub unsafe fn qt_metacall(
    &mut self,
    arg1: Call,
    arg2: c_int,
    arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]

Calls C++ function: virtual int Qt3DCore::QAspectEngine::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3).

pub unsafe fn qt_metacast(
    &mut self,
    arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
[src]

Calls C++ function: virtual void* Qt3DCore::QAspectEngine::qt_metacast(const char* arg1).

pub unsafe fn register_aspect_q_abstract_aspect(
    &mut self,
    aspect: impl CastInto<MutPtr<QAbstractAspect>>
)
[src]

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

Calls C++ function: void Qt3DCore::QAspectEngine::registerAspect(Qt3DCore::QAbstractAspect* aspect).

C++ documentation:

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

pub unsafe fn register_aspect_q_string(
    &mut self,
    name: impl CastInto<Ref<QString>>
)
[src]

Registers a new aspect to the AspectManager based on its name Uses the currently set aspect factory to create the actual aspect instance.

Calls C++ function: void Qt3DCore::QAspectEngine::registerAspect(const QString& name).

C++ documentation:

Registers a new aspect to the AspectManager based on its name Uses the currently set aspect factory to create the actual aspect instance.

pub unsafe fn static_meta_object() -> Ref<QMetaObject>[src]

Returns a reference to the staticMetaObject field.

pub unsafe fn tr(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DCore::QAspectEngine::tr(const char* s, const char* c, int n).

pub unsafe fn tr_utf8(
    s: impl CastInto<Ptr<c_char>>,
    c: impl CastInto<Ptr<c_char>>,
    n: c_int
) -> CppBox<QString>
[src]

Calls C++ function: static QString Qt3DCore::QAspectEngine::trUtf8(const char* s, const char* c, int n).

pub unsafe fn unregister_aspect_q_abstract_aspect(
    &mut self,
    aspect: impl CastInto<MutPtr<QAbstractAspect>>
)
[src]

Unregisters and deletes the given aspect.

Calls C++ function: void Qt3DCore::QAspectEngine::unregisterAspect(Qt3DCore::QAbstractAspect* aspect).

C++ documentation:

Unregisters and deletes the given aspect.

pub unsafe fn unregister_aspect_q_string(
    &mut self,
    name: impl CastInto<Ref<QString>>
)
[src]

Unregisters and deletes the aspect with the given name.

Calls C++ function: void Qt3DCore::QAspectEngine::unregisterAspect(const QString& name).

C++ documentation:

Unregisters and deletes the aspect with the given name.

Trait Implementations

impl CppDeletable for QAspectEngine[src]

unsafe fn delete(&mut self)[src]

Destroys the engine.

Calls C++ function: virtual [destructor] void Qt3DCore::QAspectEngine::~QAspectEngine().

C++ documentation:

Destroys the engine.

impl Deref for QAspectEngine[src]

type Target = QObject

The resulting type after dereferencing.

fn deref(&self) -> &QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DCore::QAspectEngine* ptr).

impl DerefMut for QAspectEngine[src]

fn deref_mut(&mut self) -> &mut QObject[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DCore::QAspectEngine* ptr).

impl DynamicCast<QAspectEngine> for QObject[src]

unsafe fn dynamic_cast(ptr: Ptr<QObject>) -> Ptr<QAspectEngine>[src]

Calls C++ function: Qt3DCore::QAspectEngine* dynamic_cast<Qt3DCore::QAspectEngine*>(QObject* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QObject>) -> MutPtr<QAspectEngine>[src]

Calls C++ function: Qt3DCore::QAspectEngine* dynamic_cast<Qt3DCore::QAspectEngine*>(QObject* ptr).

impl StaticDowncast<QAspectEngine> for QObject[src]

unsafe fn static_downcast(ptr: Ptr<QObject>) -> Ptr<QAspectEngine>[src]

Calls C++ function: Qt3DCore::QAspectEngine* static_cast<Qt3DCore::QAspectEngine*>(QObject* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QObject>) -> MutPtr<QAspectEngine>[src]

Calls C++ function: Qt3DCore::QAspectEngine* static_cast<Qt3DCore::QAspectEngine*>(QObject* ptr).

impl StaticUpcast<QObject> for QAspectEngine[src]

unsafe fn static_upcast(ptr: Ptr<QAspectEngine>) -> Ptr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DCore::QAspectEngine* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QAspectEngine>) -> MutPtr<QObject>[src]

Calls C++ function: QObject* static_cast<QObject*>(Qt3DCore::QAspectEngine* ptr).

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T, U> CastInto<U> for T where
    U: CastFrom<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> StaticUpcast<T> for T[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.