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. En savoir plus...

En-tête : #include <qphongalphamaterial.h>
CMake : find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake : QT += 3dextras
Hérite de : Qt3DRender::QMaterial
Statut : Obsolète

Cette classe est obsolète. Nous déconseillons fortement de l'utiliser dans du 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 repose sur la combinaison de trois composantes d'éclairage : ambiante, diffuse et spéculaire. L'intensité relative de ces composantes est contrôlée par leurs coefficients de réflectivité, modélisés sous forme de triplets RVB :

  • L'éclairage ambiant correspond à la couleur émise par un objet en l'absence de toute autre source lumineuse.
  • La couleur diffuse correspond à la couleur émise par les reflets sur des surfaces rugueuses sous l'effet de la lumière.
  • La couleur spéculaire correspond à la couleur émise par les reflets sur une surface brillante sous l'effet de la lumière.
  • La brillance d’une surface est contrôlée par une propriété de type float.
  • L'alpha correspond à la transparence de la surface, comprise entre 0 (entièrement transparente) et 1 (opaque).

Ce matériau utilise un effet basé sur une approche à 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 des 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

Contient 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 mélange.

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 destination de l'équation de fusion.

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

Contient 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 brillance.

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 mélange.

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 fusion RVB de la source de l'équation de fusion.

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

Contient la couleur spéculaire.

Fonctions d'accès :

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

Signal de notification :

void specularChanged(const QColor &specular)

Documentation des fonctions membres

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

Crée une nouvelle instance de QPhongAlphaMaterial dont l'objet parent est parent.

[virtual noexcept] QPhongAlphaMaterial::~QPhongAlphaMaterial()

Supprime l'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.