QPhongAlphaMaterial Class

class Qt3DExtras::QPhongAlphaMaterial

QPhongAlphaMaterial クラスは、アルファを使ったフォン照明効果のデフォルト実装を提供します。もっと詳しく...

ヘッダー #include <QPhongAlphaMaterial>
CMake: find_package(Qt6 REQUIRED COMPONENTS 3dextras)
target_link_libraries(mytarget PRIVATE Qt6::3dextras)
qmake: QT += 3dextras
を継承する: Qt3DRender::QMaterial
ステータス非推奨

このクラスは非推奨です。新しいコードで使用しないことを強くお勧めします。

プロパティ

パブリック機能

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

パブリックスロット

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)

シグナル

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)

詳細説明

このクラスは非推奨です。代わりにQDiffuseSpecularMaterial を使ってください。

フォンの照明効果は、アンビエント、ディフューズ、スペキュラの3つの照明コンポーネントの組み合わせに基づいています。これらのコンポーネントの相対的な強さは、RGBトリプレットとしてモデル化された反射係数によって制御されます:

  • アンビエントは、他の光源がない場合に物体から発せられる色です。
  • ディフューズ(Diffuse)とは、ライトによる急激な表面反射に対して発せられる色です。
  • スペキュラ(Specular)とは、ライトによる表面の光沢のある反射に対して発せられる色です。
  • サーフェスの輝きは float プロパティで制御します。
  • Alphaは、0(完全に透明)から1(不透明)の間の表面の透明度です。

このマテリアルは、シングルレンダリングパスアプローチでエフェクトを使用し、フラグメントごとにライティングを実行します。テクニックはOpenGL 2、OpenGL 3以上、OpenGL ES 2用に提供されています。

プロパティのドキュメント

alpha : float

0から1の間で変化するオブジェクトのアルファ成分を保持する。

デフォルト値は 0.5f です。

アクセス関数:

float alpha() const
void setAlpha(float alpha)

通知シグナル:

void alphaChanged(float alpha)

ambient : QColor

アンビエントカラーを保持します。

アクセス機能

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

通知信号

void ambientChanged(const QColor &ambient)

blendFunctionArg : Qt3DRender::QBlendEquation::BlendFunction

ブレンド方程式関数の引数を保持します。

アクセス関数:

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

通知シグナル:

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

Qt3DRender::QBlendEquation::BlendFunctionも参照

destinationAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

ブレンド方程式出力アルファブレンド引数を保持します。

アクセス関数:

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

通知シグナル:

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

Qt3DRender::QBlendEquationArguments::Blendingも参照

destinationRgbArg : Qt3DRender::QBlendEquationArguments::Blending

ブレンド方程式のデスティネーション RGB ブレンド引数を保持します。

アクセス関数:

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

通知シグナル:

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

Qt3DRender::QBlendEquationArguments::Blendingも参照

diffuse : QColor

拡散色を保持します。

アクセス機能

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

通知シグナル

void diffuseChanged(const QColor &diffuse)

shininess : float

輝度指数を保持する。

アクセス関数:

float shininess() const
void setShininess(float shininess)

通知シグナル:

void shininessChanged(float shininess)

sourceAlphaArg : Qt3DRender::QBlendEquationArguments::Blending

ブレンド方程式ソースのアルファブレンディング引数を保持します。

アクセス関数:

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

通知シグナル:

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

Qt3DRender::QBlendEquationArguments::Blendingも参照

sourceRgbArg : Qt3DRender::QBlendEquationArguments::Blending

ブレンド方程式ソース RGB ブレンド引数を保持します。

アクセス関数:

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

通知シグナル:

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

Qt3DRender::QBlendEquationArguments::Blendingも参照

specular : QColor

スペキュラカラーを保持します。

アクセス関数:

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

通知シグナル:

void specularChanged(const QColor &specular)

メンバ関数ドキュメント

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

親オブジェクトparent を持つ新しい QPhongAlphaMaterial インスタンスを構築します。

[virtual noexcept] QPhongAlphaMaterial::~QPhongAlphaMaterial()

QPhongAlphaMaterial を破壊する。

© 2025 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.