[][src]Struct qt_3d_render::QBuffer

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

Provides a data store for raw data to later be used as vertices or uniforms.

C++ class: Qt3DRender::QBuffer.

C++ documentation:

Provides a data store for raw data to later be used as vertices or uniforms.

Data can either be provided directly using QBuffer::setData() or by specifying a generator with QBuffer::setDataGenerator() and providing a Qt3DRender::QBufferDataGeneratorPtr.

When using a generator the data will be loaded asynchronously in a job. The loaded data can be read back if the QBuffer::syncData flag is set to true.

Methods

impl QBuffer[src]

pub fn slot_set_type(&self) -> Receiver<(BufferType,)>[src]

Holds the buffer type.

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

C++ documentation:

Holds the buffer type.

Access functions:

BufferType type() const
void setType(BufferType type)

Notifier signal:

void typeChanged(BufferType type)

pub fn slot_set_usage(&self) -> Receiver<(UsageType,)>[src]

Holds the buffer usage.

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

C++ documentation:

Holds the buffer usage.

Access functions:

UsageType usage() const
void setUsage(UsageType usage)

Notifier signal:

void usageChanged(UsageType usage)

pub fn slot_set_sync_data(&self) -> Receiver<(bool,)>[src]

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

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

C++ documentation:

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Note: : This has no effect if the buffer's data was set directly using the data property.

Access functions:

bool isSyncData() const
void setSyncData(bool syncData)

Notifier signal:

void syncDataChanged(bool syncData)

pub fn slot_set_access_type(&self) -> Receiver<(AccessType,)>[src]

Access functions:

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

C++ documentation:

Access functions:

AccessType accessType() const
void setAccessType(AccessType access)

Notifier signal:

void accessTypeChanged(AccessType access)

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

This signal is emitted with bytes when data changes.

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

C++ documentation:

This signal is emitted with bytes when data changes.

pub fn type_changed(&self) -> Signal<(BufferType,)>[src]

Holds the buffer type.

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

C++ documentation:

Holds the buffer type.

Access functions:

BufferType type() const
void setType(BufferType type)

Notifier signal:

void typeChanged(BufferType type)

pub fn usage_changed(&self) -> Signal<(UsageType,)>[src]

Holds the buffer usage.

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

C++ documentation:

Holds the buffer usage.

Access functions:

UsageType usage() const
void setUsage(UsageType usage)

Notifier signal:

void usageChanged(UsageType usage)

pub fn sync_data_changed(&self) -> Signal<(bool,)>[src]

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

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

C++ documentation:

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Note: : This has no effect if the buffer's data was set directly using the data property.

Access functions:

bool isSyncData() const
void setSyncData(bool syncData)

Notifier signal:

void syncDataChanged(bool syncData)

pub fn access_type_changed(&self) -> Signal<(AccessType,)>[src]

Access functions:

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

C++ documentation:

Access functions:

AccessType accessType() const
void setAccessType(AccessType access)

Notifier signal:

void accessTypeChanged(AccessType access)

pub fn data_available(&self) -> Signal<()>[src]

This signal is emitted when data becomes available.

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

C++ documentation:

This signal is emitted when data becomes available.

pub unsafe fn access_type(&self) -> AccessType[src]

Access functions:

Calls C++ function: Qt3DRender::QBuffer::AccessType Qt3DRender::QBuffer::accessType() const.

C++ documentation:

Access functions:

AccessType accessType() const
void setAccessType(AccessType access)

Notifier signal:

void accessTypeChanged(AccessType access)

pub unsafe fn data(&self) -> CppBox<QByteArray>[src]

Returns the data.

Calls C++ function: QByteArray Qt3DRender::QBuffer::data() const.

C++ documentation:

Returns the data.

See also setData().

pub unsafe fn is_sync_data(&self) -> bool[src]

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Calls C++ function: bool Qt3DRender::QBuffer::isSyncData() const.

C++ documentation:

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Note: : This has no effect if the buffer's data was set directly using the data property.

Access functions:

bool isSyncData() const
void setSyncData(bool syncData)

Notifier signal:

void syncDataChanged(bool syncData)

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

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

pub unsafe fn from_buffer_type_q_node(
    ty: BufferType,
    parent: impl CastInto<Ptr<QNode>>
) -> QBox<QBuffer>
[src]

Default constructs an instance of QBuffer.

Calls C++ function: [constructor] void Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType ty = …, Qt3DCore::QNode* parent = …).

C++ documentation:

Default constructs an instance of QBuffer.

pub unsafe fn new() -> QBox<QBuffer>[src]

Provides a data store for raw data to later be used as vertices or uniforms.

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

C++ documentation:

Provides a data store for raw data to later be used as vertices or uniforms.

Data can either be provided directly using QBuffer::setData() or by specifying a generator with QBuffer::setDataGenerator() and providing a Qt3DRender::QBufferDataGeneratorPtr.

When using a generator the data will be loaded asynchronously in a job. The loaded data can be read back if the QBuffer::syncData flag is set to true.

pub unsafe fn from_buffer_type(ty: BufferType) -> QBox<QBuffer>[src]

Default constructs an instance of QBuffer.

Calls C++ function: [constructor] void Qt3DRender::QBuffer::QBuffer(Qt3DRender::QBuffer::BufferType ty = …).

C++ documentation:

Default constructs an instance of QBuffer.

pub unsafe fn from_q_node(parent: impl CastInto<Ptr<QNode>>) -> QBox<QBuffer>[src]

This is supported on cpp_lib_version="5.11.3" or cpp_lib_version="5.12.2" or cpp_lib_version="5.13.0" or cpp_lib_version="5.14.0" only.

Constructs a new QBuffer with parent.

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

C++ documentation:

Constructs a new QBuffer with parent.

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

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

pub unsafe fn qt_metacast(&self, arg1: *const c_char) -> *mut c_void[src]

Calls C++ function: virtual void* Qt3DRender::QBuffer::qt_metacast(const char* arg1).

pub unsafe fn set_access_type(&self, access: AccessType)[src]

Access functions:

Calls C++ function: [slot] void Qt3DRender::QBuffer::setAccessType(Qt3DRender::QBuffer::AccessType access).

C++ documentation:

Access functions:

AccessType accessType() const
void setAccessType(AccessType access)

Notifier signal:

void accessTypeChanged(AccessType access)

pub unsafe fn set_data(&self, bytes: impl CastInto<Ref<QByteArray>>)[src]

Sets bytes as data.

Calls C++ function: void Qt3DRender::QBuffer::setData(const QByteArray& bytes).

C++ documentation:

Sets bytes as data.

See also data().

pub unsafe fn set_sync_data(&self, sync_data: bool)[src]

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Calls C++ function: [slot] void Qt3DRender::QBuffer::setSyncData(bool syncData).

C++ documentation:

Holds the syncData flag. When syncData is true, this will force data created by a Qt3DRender::QBufferDataGenerator to also be updated on the frontend Qt3DRender::QBuffer node. By default syncData is false.

Note: : This has no effect if the buffer's data was set directly using the data property.

Access functions:

bool isSyncData() const
void setSyncData(bool syncData)

Notifier signal:

void syncDataChanged(bool syncData)

pub unsafe fn set_type(&self, type_: BufferType)[src]

Holds the buffer type.

Calls C++ function: [slot] void Qt3DRender::QBuffer::setType(Qt3DRender::QBuffer::BufferType type).

C++ documentation:

Holds the buffer type.

Access functions:

BufferType type() const
void setType(BufferType type)

Notifier signal:

void typeChanged(BufferType type)

pub unsafe fn set_usage(&self, usage: UsageType)[src]

Holds the buffer usage.

Calls C++ function: [slot] void Qt3DRender::QBuffer::setUsage(Qt3DRender::QBuffer::UsageType usage).

C++ documentation:

Holds the buffer usage.

Access functions:

UsageType usage() const
void setUsage(UsageType usage)

Notifier signal:

void usageChanged(UsageType usage)

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

Returns a reference to the staticMetaObject field.

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

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

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

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

pub unsafe fn type_(&self) -> BufferType[src]

Holds the buffer type.

Calls C++ function: Qt3DRender::QBuffer::BufferType Qt3DRender::QBuffer::type() const.

C++ documentation:

Holds the buffer type.

Access functions:

BufferType type() const
void setType(BufferType type)

Notifier signal:

void typeChanged(BufferType type)

pub unsafe fn update_data(
    &self,
    offset: c_int,
    bytes: impl CastInto<Ref<QByteArray>>
)
[src]

Updates the data by replacing it with bytes at offset.

Calls C++ function: void Qt3DRender::QBuffer::updateData(int offset, const QByteArray& bytes).

C++ documentation:

Updates the data by replacing it with bytes at offset.

pub unsafe fn usage(&self) -> UsageType[src]

Holds the buffer usage.

Calls C++ function: Qt3DRender::QBuffer::UsageType Qt3DRender::QBuffer::usage() const.

C++ documentation:

Holds the buffer usage.

Access functions:

UsageType usage() const
void setUsage(UsageType usage)

Notifier signal:

void usageChanged(UsageType usage)

Trait Implementations

impl CppDeletable for QBuffer[src]

unsafe fn delete(&self)[src]

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

impl Deref for QBuffer[src]

type Target = QNode

The resulting type after dereferencing.

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

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

impl DynamicCast<QBuffer> for QNode[src]

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

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

impl DynamicCast<QBuffer> for QObject[src]

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

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

impl StaticDowncast<QBuffer> for QNode[src]

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

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

impl StaticDowncast<QBuffer> for QObject[src]

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

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

impl StaticUpcast<QNode> for QBuffer[src]

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

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

impl StaticUpcast<QObject> for QBuffer[src]

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

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

Auto Trait Implementations

impl RefUnwindSafe for QBuffer

impl Send for QBuffer

impl Sync for QBuffer

impl Unpin for QBuffer

impl UnwindSafe for QBuffer

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.