QPhongMaterial Class
class Qt3DExtras::QPhongMaterialQPhongMaterial クラスは、フォン照明効果のデフォルト実装を提供します。もっと詳しく...
ヘッダー | #include <QPhongMaterial> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
qmake: | QT += 3dextras |
を継承する: | Qt3DRender::QMaterial |
ステータス | 非推奨 |
このクラスは非推奨です。新しいコードで使用しないことを強くお勧めします。
プロパティ
パブリック機能
QPhongMaterial(Qt3DCore::QNode *parent = nullptr) | |
virtual | ~QPhongMaterial() |
QColor | ambient() const |
QColor | diffuse() const |
float | shininess() const |
QColor | specular() const |
パブリックスロット
void | setAmbient(const QColor &ambient) |
void | setDiffuse(const QColor &diffuse) |
void | setShininess(float shininess) |
void | setSpecular(const QColor &specular) |
シグナル
void | ambientChanged(const QColor &ambient) |
void | diffuseChanged(const QColor &diffuse) |
void | shininessChanged(float shininess) |
void | specularChanged(const QColor &specular) |
詳細説明
このクラスは非推奨です。代わりにQDiffuseSpecularMaterial を使ってください。
フォンの照明効果は、アンビエント、ディフューズ、スペキュラの3つの照明コンポーネントの組み合わせに基づいています。これらのコンポーネントの相対的な強さは、RGBトリプレットとしてモデル化された反射係数によって制御されます:
- アンビエントは、他の光源がない場合に物体から発せられる色です。
- ディフューズ(Diffuse)とは、ライトによる急激な表面反射に対して発せられる色です。
- スペキュラ(Specular)とは、ライトによる光沢のある表面の反射に対して発せられる色です。
- 表面の輝きは float プロパティで制御します。
このマテリアルは、シングル レンダー パス アプローチのエフェクトを使用し、フラグメントごとにライティングを実行します。テクニックはOpenGL 2、OpenGL 3以上、OpenGL ES 2用に提供されています。
プロパティのドキュメント
ambient : QColor
アンビエントカラーを保持します。
アクセス機能
QColor | ambient() const |
void | setAmbient(const QColor &ambient) |
通知信号
void | ambientChanged(const QColor &ambient) |
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) |
specular : QColor
スペキュラカラーを保持します。
アクセス関数:
QColor | specular() const |
void | setSpecular(const QColor &specular) |
通知シグナル:
void | specularChanged(const QColor &specular) |
メンバ関数ドキュメント
[explicit]
QPhongMaterial::QPhongMaterial(Qt3DCore::QNode *parent = nullptr)
親オブジェクトparent を持つ新しい QPhongMaterial インスタンスを構築します。
[virtual noexcept]
QPhongMaterial::~QPhongMaterial()
QPhongMaterial を破壊する。
© 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.