Sur cette page

Qt3DExtras::QPhongAlphaMaterial Class

class Qt3DExtras::QPhongAlphaMaterial

La classe QPhongAlphaMaterial fournit une implémentation par défaut de l'effet d'éclairage phong avec alpha. Plus d'informations...

En-tête : #include <QPhongAlphaMaterial>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake : QT += 3dextras
Hérite : Qt3DRender::QMaterial
Statut : Déclassé

Cette classe est obsolète. Il est fortement déconseillé de l'utiliser dans un nouveau code.

Propriétés

Fonctions publiques

QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr)
virtual ~QPhongAlphaMaterial()
float alpha() const
QColor ambient() const
Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg() const
Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg() const
Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg() const
QColor diffuse() const
float shininess() const
Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg() const
Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg() const
QColor specular() const

Emplacements publics

void setAlpha(float alpha)
void setAmbient(const QColor &ambient)
void setBlendFunctionArg(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)
void setDestinationAlphaArg(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)
void setDestinationRgbArg(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)
void setDiffuse(const QColor &diffuse)
void setShininess(float shininess)
void setSourceAlphaArg(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)
void setSourceRgbArg(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)
void setSpecular(const QColor &specular)

Signaux

void alphaChanged(float alpha)
void ambientChanged(const QColor &ambient)
void blendFunctionArgChanged(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)
void destinationAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)
void destinationRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)
void diffuseChanged(const QColor &diffuse)
void shininessChanged(float shininess)
void sourceAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)
void sourceRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)
void specularChanged(const QColor &specular)

Description détaillée

Cette classe est obsolète ; utilisez plutôt QDiffuseSpecularMaterial.

L'effet d'éclairage phong est basé sur la combinaison de 3 composantes d'éclairage : ambiant, diffus et spéculaire. Les forces relatives de ces composantes sont contrôlées au moyen de leurs coefficients de réflectivité qui sont modélisés sous forme de triplets RVB :

  • Ambiant est la couleur émise par un objet sans autre source de lumière.
  • Diffuse est la couleur émise pour les réflexions de surface brutes avec les lumières.
  • La couleur spéculaire est la couleur émise pour les reflets de surface brillants avec les lumières.
  • La brillance d'une surface est contrôlée par une propriété flottante.
  • Alpha est la transparence de la surface entre 0 (totalement transparent) et 1 (opaque).

Ce matériau utilise un effet avec une approche de passage de rendu unique et effectue un éclairage par fragment. Des techniques sont fournies pour OpenGL 2, OpenGL 3 ou supérieur ainsi que pour OpenGL ES 2.

Documentation sur les propriétés

alpha : float

Contient la composante alpha de l'objet, qui varie entre 0 et 1.

La valeur par défaut est 0,5f.

Fonctions d'accès :

float alpha() const
void setAlpha(float alpha)

Signal de notification :

void alphaChanged(float alpha)

ambient : QColor

Maintient la couleur ambiante.

Fonctions d'accès :

QColor ambient() const
void setAmbient(const QColor &ambient)

Signal de notification :

void ambientChanged(const QColor &ambient)

blendFunctionArg : Qt3DRender::QBlendEquation::BlendFunction

Contient l'argument de la fonction d'équation de mélange.

Fonctions d'accès :

Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg() const
void setBlendFunctionArg(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)

Signal de notification :

void blendFunctionArgChanged(Qt3DRender::QBlendEquation::BlendFunction blendFunctionArg)

Voir aussi Qt3DRender::QBlendEquation::BlendFunction.

destinationAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

Contient l'argument de mélange alpha de la destination de l'équation de fusion.

Fonctions d'accès :

Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg() const
void setDestinationAlphaArg(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)

Signal de notification :

void destinationAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationAlphaArg)

Voir aussi Qt3DRender::QBlendEquationArguments::Blending.

destinationRgbArg : Qt3DRender::QBlendEquationArguments::Blending

Contient l'argument de fusion RVB de l'équation de fusion de destination.

Fonctions d'accès :

Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg() const
void setDestinationRgbArg(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)

Signal de notification :

void destinationRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending destinationRgbArg)

Voir aussi Qt3DRender::QBlendEquationArguments::Blending.

diffuse : QColor

Détient la couleur diffuse.

Fonctions d'accès :

QColor diffuse() const
void setDiffuse(const QColor &diffuse)

Signal de notification :

void diffuseChanged(const QColor &diffuse)

shininess : float

Contient l'exposant de l'éclat.

Fonctions d'accès :

float shininess() const
void setShininess(float shininess)

Signal de notification :

void shininessChanged(float shininess)

sourceAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

Contient l'argument de mélange alpha de la source de l'équation de fusion.

Fonctions d'accès :

Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg() const
void setSourceAlphaArg(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)

Signal de notification :

void sourceAlphaArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceAlphaArg)

Voir aussi Qt3DRender::QBlendEquationArguments::Blending.

sourceRgbArg : Qt3DRender::QBlendEquationArguments::Blending

Contient l'argument de mélange RVB source de l'équation de mélange.

Fonctions d'accès :

Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg() const
void setSourceRgbArg(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)

Signal de notification :

void sourceRgbArgChanged(Qt3DRender::QBlendEquationArguments::Blending sourceRgbArg)

Voir aussi Qt3DRender::QBlendEquationArguments::Blending.

specular : QColor

Détient la couleur spéculaire.

Fonctions d'accès :

QColor specular() const
void setSpecular(const QColor &specular)

Signal du notificateur :

void specularChanged(const QColor &specular)

Fonction membre Documentation

[explicit] QPhongAlphaMaterial::QPhongAlphaMaterial(Qt3DCore::QNode *parent = nullptr)

Construit une nouvelle instance de QPhongAlphaMaterial avec l'objet parent parent.

[virtual noexcept] QPhongAlphaMaterial::~QPhongAlphaMaterial()

Détruit le site QPhongAlphaMaterial.

© 2026 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.