[][src]Struct qt_3d_render::QSceneLoader

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

Provides the facility to load an existing Scene

C++ class: Qt3DRender::QSceneLoader.

C++ documentation:

Provides the facility to load an existing Scene

Given a 3D source file, the Qt3DRender::QSceneLoader will try to parse it and build a tree of Qt3DCore::QEntity objects with proper Qt3DRender::QGeometryRenderer, Qt3DCore::QTransform and Qt3DRender::QMaterial components.

The loader will try to determine the best material to be used based on the properties of the model file. If you wish to use a custom material, you will have to traverse the tree and replace the default associated materials with yours.

As the name implies, Qt3DRender::QSceneLoader loads a complete scene subtree. If you wish to load a single piece of geometry, you should rather use the Qt3DRender::QMesh instead.

Qt3DRender::QSceneLoader internally relies on the use of plugins to support a wide variety of 3D file formats. Here is a list of formats that are supported by Qt3D.

Note: this component shouldn't be shared among several Qt3DCore::QEntity instances. Undefined behavior will result.

Methods

impl QSceneLoader[src]

pub fn slot_set_source(&self) -> Receiver<(*const QUrl,)>[src]

Holds the url to the source to be loaded.

Returns a built-in Qt slot Qt3DRender::QSceneLoader::setSource that can be passed to qt_core::Signal::connect.

C++ documentation:

Holds the url to the source to be loaded.

Access functions:

QUrl source() const
void setSource(const QUrl &arg)

Notifier signal:

void sourceChanged(const QUrl &source)

pub fn slot_set_status(&self) -> Receiver<(Status,)>[src]

Returns a built-in Qt slot Qt3DRender::QSceneLoader::setStatus that can be passed to qt_core::Signal::connect.

pub fn source_changed(&self) -> Signal<(*const QUrl,)>[src]

Holds the url to the source to be loaded.

Returns a built-in Qt signal Qt3DRender::QSceneLoader::sourceChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Holds the url to the source to be loaded.

Access functions:

QUrl source() const
void setSource(const QUrl &arg)

Notifier signal:

void sourceChanged(const QUrl &source)

pub fn status_changed(&self) -> Signal<(Status,)>[src]

Holds the status of scene loading.

Returns a built-in Qt signal Qt3DRender::QSceneLoader::statusChanged that can be passed to qt_core::Signal::connect.

C++ documentation:

Holds the status of scene loading.

Access functions:

Status status() const

Notifier signal:

void statusChanged(Status status)

See also Qt3DRender::QSceneLoader::Status.

pub unsafe fn component(
    &self,
    entity_name: impl CastInto<Ref<QString>>,
    component_type: ComponentType
) -> QMutPtr<QComponent>
[src]

Returns a component matching componentType of a loaded entity with an objectName matching the entityName. If the entity has multiple matching components, the first match in the component list of the entity is returned. If there is no match, a null pointer is returned.

Calls C++ function: Qt3DCore::QComponent* Qt3DRender::QSceneLoader::component(const QString& entityName, Qt3DRender::QSceneLoader::ComponentType componentType) const.

C++ documentation:

Returns a component matching componentType of a loaded entity with an objectName matching the entityName. If the entity has multiple matching components, the first match in the component list of the entity is returned. If there is no match, a null pointer is returned.

pub unsafe fn entity(
    &self,
    entity_name: impl CastInto<Ref<QString>>
) -> QMutPtr<QEntity>
[src]

Returns a loaded entity with an objectName matching the entityName parameter. If multiple entities have the same name, it is undefined which one of them is returned, but it will always be the same one.

Calls C++ function: Qt3DCore::QEntity* Qt3DRender::QSceneLoader::entity(const QString& entityName) const.

C++ documentation:

Returns a loaded entity with an objectName matching the entityName parameter. If multiple entities have the same name, it is undefined which one of them is returned, but it will always be the same one.

pub unsafe fn entity_names(&self) -> CppBox<QStringList>[src]

Returns a list of the objectNames of the loaded entities.

Calls C++ function: QStringList Qt3DRender::QSceneLoader::entityNames() const.

C++ documentation:

Returns a list of the objectNames of the loaded entities.

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

Calls C++ function: virtual const QMetaObject* Qt3DRender::QSceneLoader::metaObject() const.

pub unsafe fn new_1a(parent: impl CastInto<MutPtr<QNode>>) -> QBox<QSceneLoader>[src]

Default constructs an instance of QSceneLoader.

Calls C++ function: [constructor] void Qt3DRender::QSceneLoader::QSceneLoader(Qt3DCore::QNode* parent = …).

C++ documentation:

Default constructs an instance of QSceneLoader.

pub unsafe fn new_0a() -> QBox<QSceneLoader>[src]

Provides the facility to load an existing Scene

Calls C++ function: [constructor] void Qt3DRender::QSceneLoader::QSceneLoader().

C++ documentation:

Provides the facility to load an existing Scene

Given a 3D source file, the Qt3DRender::QSceneLoader will try to parse it and build a tree of Qt3DCore::QEntity objects with proper Qt3DRender::QGeometryRenderer, Qt3DCore::QTransform and Qt3DRender::QMaterial components.

The loader will try to determine the best material to be used based on the properties of the model file. If you wish to use a custom material, you will have to traverse the tree and replace the default associated materials with yours.

As the name implies, Qt3DRender::QSceneLoader loads a complete scene subtree. If you wish to load a single piece of geometry, you should rather use the Qt3DRender::QMesh instead.

Qt3DRender::QSceneLoader internally relies on the use of plugins to support a wide variety of 3D file formats. Here is a list of formats that are supported by Qt3D.

Note: this component shouldn't be shared among several Qt3DCore::QEntity instances. Undefined behavior will result.

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 Qt3DRender::QSceneLoader::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* Qt3DRender::QSceneLoader::qt_metacast(const char* arg1).

pub unsafe fn set_source(&mut self, arg: impl CastInto<Ref<QUrl>>)[src]

Holds the url to the source to be loaded.

Calls C++ function: [slot] void Qt3DRender::QSceneLoader::setSource(const QUrl& arg).

C++ documentation:

Holds the url to the source to be loaded.

Access functions:

QUrl source() const
void setSource(const QUrl &arg)

Notifier signal:

void sourceChanged(const QUrl &source)

pub unsafe fn set_status(&mut self, status: Status)[src]

Calls C++ function: [slot] void Qt3DRender::QSceneLoader::setStatus(Qt3DRender::QSceneLoader::Status status).

pub unsafe fn source(&self) -> CppBox<QUrl>[src]

Holds the url to the source to be loaded.

Calls C++ function: QUrl Qt3DRender::QSceneLoader::source() const.

C++ documentation:

Holds the url to the source to be loaded.

Access functions:

QUrl source() const
void setSource(const QUrl &arg)

Notifier signal:

void sourceChanged(const QUrl &source)

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

Returns a reference to the staticMetaObject field.

pub unsafe fn status(&self) -> Status[src]

Holds the status of scene loading.

Calls C++ function: Qt3DRender::QSceneLoader::Status Qt3DRender::QSceneLoader::status() const.

C++ documentation:

Holds the status of scene loading.

Access functions:

Status status() const

Notifier signal:

void statusChanged(Status status)

See also Qt3DRender::QSceneLoader::Status.

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 Qt3DRender::QSceneLoader::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 Qt3DRender::QSceneLoader::trUtf8(const char* s, const char* c, int n).

Trait Implementations

impl CppDeletable for QSceneLoader[src]

unsafe fn delete(&mut self)[src]

Calls C++ function: virtual [destructor] void Qt3DRender::QSceneLoader::~QSceneLoader().

impl Deref for QSceneLoader[src]

type Target = QComponent

The resulting type after dereferencing.

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

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QSceneLoader* ptr).

impl DerefMut for QSceneLoader[src]

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

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QSceneLoader* ptr).

impl DynamicCast<QSceneLoader> for QComponent[src]

unsafe fn dynamic_cast(ptr: Ptr<QComponent>) -> Ptr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QComponent* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QComponent>) -> MutPtr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QComponent* ptr).

impl DynamicCast<QSceneLoader> for QNode[src]

unsafe fn dynamic_cast(ptr: Ptr<QNode>) -> Ptr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QNode* ptr).

unsafe fn dynamic_cast_mut(ptr: MutPtr<QNode>) -> MutPtr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QNode* ptr).

impl DynamicCast<QSceneLoader> for QObject[src]

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

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(QObject* ptr).

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

Calls C++ function: Qt3DRender::QSceneLoader* dynamic_cast<Qt3DRender::QSceneLoader*>(QObject* ptr).

impl StaticDowncast<QSceneLoader> for QComponent[src]

unsafe fn static_downcast(ptr: Ptr<QComponent>) -> Ptr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QComponent* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QComponent>) -> MutPtr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QComponent* ptr).

impl StaticDowncast<QSceneLoader> for QNode[src]

unsafe fn static_downcast(ptr: Ptr<QNode>) -> Ptr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QNode* ptr).

unsafe fn static_downcast_mut(ptr: MutPtr<QNode>) -> MutPtr<QSceneLoader>[src]

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(Qt3DCore::QNode* ptr).

impl StaticDowncast<QSceneLoader> for QObject[src]

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

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(QObject* ptr).

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

Calls C++ function: Qt3DRender::QSceneLoader* static_cast<Qt3DRender::QSceneLoader*>(QObject* ptr).

impl StaticUpcast<QComponent> for QSceneLoader[src]

unsafe fn static_upcast(ptr: Ptr<QSceneLoader>) -> Ptr<QComponent>[src]

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QSceneLoader* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QSceneLoader>) -> MutPtr<QComponent>[src]

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DRender::QSceneLoader* ptr).

impl StaticUpcast<QNode> for QSceneLoader[src]

unsafe fn static_upcast(ptr: Ptr<QSceneLoader>) -> Ptr<QNode>[src]

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QSceneLoader* ptr).

unsafe fn static_upcast_mut(ptr: MutPtr<QSceneLoader>) -> MutPtr<QNode>[src]

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DRender::QSceneLoader* ptr).

impl StaticUpcast<QObject> for QSceneLoader[src]

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

Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QSceneLoader* ptr).

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

Calls C++ function: QObject* static_cast<QObject*>(Qt3DRender::QSceneLoader* 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.