[−][src]Struct qt_3d_extras::QPerVertexColorMaterial
The QPerVertexColorMaterial class provides a default implementation for rendering the color properties set for each vertex.
C++ class: Qt3DExtras::QPerVertexColorMaterial
.
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<MutPtr<QNode>>
) -> QBox<QPerVertexColorMaterial>
[src]
parent: impl CastInto<MutPtr<QNode>>
) -> QBox<QPerVertexColorMaterial>
Default constructs an instance of QPerVertexColorMaterial.
Calls C++ function: [constructor] void Qt3DExtras::QPerVertexColorMaterial::QPerVertexColorMaterial(Qt3DCore::QNode* parent = …)
.
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()
.
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(
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
[src]
&mut self,
arg1: Call,
arg2: c_int,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> c_int
Calls C++ function: virtual int Qt3DExtras::QPerVertexColorMaterial::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]
&mut self,
arg1: impl CastInto<Ptr<c_char>>
) -> MutPtr<c_void>
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: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
[src]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
Calls C++ function: static QString Qt3DExtras::QPerVertexColorMaterial::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]
s: impl CastInto<Ptr<c_char>>,
c: impl CastInto<Ptr<c_char>>,
n: c_int
) -> CppBox<QString>
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
.
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
.
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(
&mut self,
parameter: impl CastInto<MutPtr<QParameter>>
)
[src]
&mut self,
parameter: impl CastInto<MutPtr<QParameter>>
)
Add a parameter to the material's parameters.
Calls C++ function: void Qt3DRender::QMaterial::addParameter(Qt3DRender::QParameter* parameter)
.
Add a parameter to the material's parameters.
pub unsafe fn effect(&self) -> QMutPtr<QEffect>
[src]
Specifies the effect to be used with the material.
Calls C++ function: Qt3DRender::QEffect* Qt3DRender::QMaterial::effect() const
.
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
.
Returns a vector of the material's current parameters
pub unsafe fn qt_metacall(
&mut self,
arg1: Call,
arg2: i32,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> i32
[src]
&mut self,
arg1: Call,
arg2: i32,
arg3: impl CastInto<MutPtr<*mut c_void>>
) -> i32
Calls C++ function: virtual int Qt3DRender::QMaterial::qt_metacall(QMetaObject::Call arg1, int arg2, void** arg3)
.
pub unsafe fn qt_metacast(
&mut self,
arg1: impl CastInto<Ptr<i8>>
) -> MutPtr<c_void>
[src]
&mut self,
arg1: impl CastInto<Ptr<i8>>
) -> MutPtr<c_void>
Calls C++ function: virtual void* Qt3DRender::QMaterial::qt_metacast(const char* arg1)
.
pub unsafe fn remove_parameter(
&mut self,
parameter: impl CastInto<MutPtr<QParameter>>
)
[src]
&mut self,
parameter: impl CastInto<MutPtr<QParameter>>
)
Remove a parameter from the material's parameters.
Calls C++ function: void Qt3DRender::QMaterial::removeParameter(Qt3DRender::QParameter* parameter)
.
Remove a parameter from the material's parameters.
pub unsafe fn set_effect(&mut self, effect: impl CastInto<MutPtr<QEffect>>)
[src]
Specifies the effect to be used with the material.
Calls C++ function: [slot] void Qt3DRender::QMaterial::setEffect(Qt3DRender::QEffect* effect)
.
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(&mut self)
[src]
Destroys the QPerVertexColorMaterial
Calls C++ function: virtual [destructor] void Qt3DExtras::QPerVertexColorMaterial::~QPerVertexColorMaterial()
.
Destroys the QPerVertexColorMaterial
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 DerefMut for QPerVertexColorMaterial
[src]
fn deref_mut(&mut self) -> &mut 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)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QMaterial>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QMaterial>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QComponent>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QComponent>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QNode>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QNode>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn dynamic_cast_mut(
ptr: MutPtr<QObject>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QObject>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QMaterial>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QMaterial>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QComponent>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QComponent>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QNode>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QNode>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn static_downcast_mut(
ptr: MutPtr<QObject>
) -> MutPtr<QPerVertexColorMaterial>
[src]
ptr: MutPtr<QObject>
) -> MutPtr<QPerVertexColorMaterial>
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)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QComponent>
[src]
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QComponent>
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)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QMaterial>
[src]
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QMaterial>
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)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QNode>
[src]
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QNode>
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)
.
unsafe fn static_upcast_mut(
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QObject>
[src]
ptr: MutPtr<QPerVertexColorMaterial>
) -> MutPtr<QObject>
Calls C++ function: QObject* static_cast<QObject*>(Qt3DExtras::QPerVertexColorMaterial* ptr)
.
Auto Trait Implementations
impl RefUnwindSafe for QPerVertexColorMaterial
impl Send for QPerVertexColorMaterial
impl Sync for QPerVertexColorMaterial
impl Unpin for QPerVertexColorMaterial
impl UnwindSafe for QPerVertexColorMaterial
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T, U> CastInto<U> for T where
U: CastFrom<T>,
[src]
U: CastFrom<T>,
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> StaticUpcast<T> for T
[src]
unsafe fn static_upcast(ptr: Ptr<T>) -> Ptr<T>
[src]
unsafe fn static_upcast_mut(ptr: MutPtr<T>) -> MutPtr<T>
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,