[][src]Struct qt_3d_extras::QPerVertexColorMaterial

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

The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.

C++ class: Qt3DExtras::QPerVertexColorMaterial.

C++ documentation:

The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.

This lighting effect is based on the combination of 2 lighting components ambient and diffuse. Ambient is set by the vertex color. Diffuse takes in account the normal distribution of each vertex.

  • Ambient is the color that is emitted by an object without any other light source.
  • Diffuse is the color that is emitted for rough surface reflections with the lights

This material uses an effect with a single render pass approach and forms fragment lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.

Methods

impl QPerVertexColorMaterial[src]

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

Calls C++ function: virtual const QMetaObject* Qt3DExtras::QPerVertexColorMaterial::metaObject() const.

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

Default constructs an instance of QPerVertexColorMaterial.

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

C++ documentation:

Default constructs an instance of QPerVertexColorMaterial.

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

The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.

Calls C++ function: [constructor] void Qt3DExtras::QPerVertexColorMaterial::QPerVertexColorMaterial().

C++ documentation:

The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.

This lighting effect is based on the combination of 2 lighting components ambient and diffuse. Ambient is set by the vertex color. Diffuse takes in account the normal distribution of each vertex.

  • Ambient is the color that is emitted by an object without any other light source.
  • Diffuse is the color that is emitted for rough surface reflections with the lights

This material uses an effect with a single render pass approach and forms fragment lighting. Techniques are provided for OpenGL 2, OpenGL 3 or above as well as OpenGL ES 2.

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

Calls C++ function: virtual int Qt3DExtras::QPerVertexColorMaterial::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* Qt3DExtras::QPerVertexColorMaterial::qt_metacast(const char* arg1).

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

Methods from Deref<Target = QMaterial>

pub fn slot_set_effect(&self) -> Receiver<(*mut QEffect,)>[src]

Specifies the effect to be used with the material.

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

C++ documentation:

Specifies the effect to be used with the material.

Access functions:

QEffect *effect() const
void setEffect(QEffect *effect)

Notifier signal:

void effectChanged(QEffect *effect)

pub fn effect_changed(&self) -> Signal<(*mut QEffect,)>[src]

Specifies the effect to be used with the material.

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

C++ documentation:

Specifies the effect to be used with the material.

Access functions:

QEffect *effect() const
void setEffect(QEffect *effect)

Notifier signal:

void effectChanged(QEffect *effect)

pub unsafe fn add_parameter(&self, parameter: impl CastInto<Ptr<QParameter>>)[src]

Add a parameter to the material's parameters.

Calls C++ function: void Qt3DRender::QMaterial::addParameter(Qt3DRender::QParameter* parameter).

C++ documentation:

Add a parameter to the material's parameters.

pub unsafe fn effect(&self) -> QPtr<QEffect>[src]

Specifies the effect to be used with the material.

Calls C++ function: Qt3DRender::QEffect* Qt3DRender::QMaterial::effect() const.

C++ documentation:

Specifies the effect to be used with the material.

Access functions:

QEffect *effect() const
void setEffect(QEffect *effect)

Notifier signal:

void effectChanged(QEffect *effect)

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

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

pub unsafe fn parameters(&self) -> CppBox<QVectorOfQParameter>[src]

Returns a vector of the material's current parameters

Calls C++ function: QVector<Qt3DRender::QParameter*> Qt3DRender::QMaterial::parameters() const.

C++ documentation:

Returns a vector of the material's current parameters

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

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

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

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

pub unsafe fn remove_parameter(&self, parameter: impl CastInto<Ptr<QParameter>>)[src]

Remove a parameter from the material's parameters.

Calls C++ function: void Qt3DRender::QMaterial::removeParameter(Qt3DRender::QParameter* parameter).

C++ documentation:

Remove a parameter from the material's parameters.

pub unsafe fn set_effect(&self, effect: impl CastInto<Ptr<QEffect>>)[src]

Specifies the effect to be used with the material.

Calls C++ function: [slot] void Qt3DRender::QMaterial::setEffect(Qt3DRender::QEffect* effect).

C++ documentation:

Specifies the effect to be used with the material.

Access functions:

QEffect *effect() const
void setEffect(QEffect *effect)

Notifier signal:

void effectChanged(QEffect *effect)

Trait Implementations

impl CppDeletable for QPerVertexColorMaterial[src]

unsafe fn delete(&self)[src]

Destroys the QPerVertexColorMaterial

Calls C++ function: virtual [destructor] void Qt3DExtras::QPerVertexColorMaterial::~QPerVertexColorMaterial().

C++ documentation:

impl Deref for QPerVertexColorMaterial[src]

type Target = QMaterial

The resulting type after dereferencing.

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

Calls C++ function: Qt3DRender::QMaterial* static_cast<Qt3DRender::QMaterial*>(Qt3DExtras::QPerVertexColorMaterial* ptr).

impl DynamicCast<QPerVertexColorMaterial> for QMaterial[src]

unsafe fn dynamic_cast(ptr: Ptr<QMaterial>) -> Ptr<QPerVertexColorMaterial>[src]

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* dynamic_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DRender::QMaterial* ptr).

impl DynamicCast<QPerVertexColorMaterial> for QComponent[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* dynamic_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DCore::QComponent* ptr).

impl DynamicCast<QPerVertexColorMaterial> for QNode[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* dynamic_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DCore::QNode* ptr).

impl DynamicCast<QPerVertexColorMaterial> for QObject[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* dynamic_cast<Qt3DExtras::QPerVertexColorMaterial*>(QObject* ptr).

impl StaticDowncast<QPerVertexColorMaterial> for QMaterial[src]

unsafe fn static_downcast(ptr: Ptr<QMaterial>) -> Ptr<QPerVertexColorMaterial>[src]

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* static_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DRender::QMaterial* ptr).

impl StaticDowncast<QPerVertexColorMaterial> for QComponent[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* static_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DCore::QComponent* ptr).

impl StaticDowncast<QPerVertexColorMaterial> for QNode[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* static_cast<Qt3DExtras::QPerVertexColorMaterial*>(Qt3DCore::QNode* ptr).

impl StaticDowncast<QPerVertexColorMaterial> for QObject[src]

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

Calls C++ function: Qt3DExtras::QPerVertexColorMaterial* static_cast<Qt3DExtras::QPerVertexColorMaterial*>(QObject* ptr).

impl StaticUpcast<QComponent> for QPerVertexColorMaterial[src]

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

Calls C++ function: Qt3DCore::QComponent* static_cast<Qt3DCore::QComponent*>(Qt3DExtras::QPerVertexColorMaterial* ptr).

impl StaticUpcast<QMaterial> for QPerVertexColorMaterial[src]

unsafe fn static_upcast(ptr: Ptr<QPerVertexColorMaterial>) -> Ptr<QMaterial>[src]

Calls C++ function: Qt3DRender::QMaterial* static_cast<Qt3DRender::QMaterial*>(Qt3DExtras::QPerVertexColorMaterial* ptr).

impl StaticUpcast<QNode> for QPerVertexColorMaterial[src]

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

Calls C++ function: Qt3DCore::QNode* static_cast<Qt3DCore::QNode*>(Qt3DExtras::QPerVertexColorMaterial* ptr).

impl StaticUpcast<QObject> for QPerVertexColorMaterial[src]

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

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