QNormalDiffuseMapMaterial Class
class Qt3DExtras::QNormalDiffuseMapMaterialQNormalDiffuseMapMaterial は、拡散光成分がテクスチャマップから読み取られ、メッシュの法線が法線テクスチャマップからレンダリングされる、フォン照明とバンプ効果のデフォルト実装を提供します。さらに詳しく
ヘッダー | #include <QNormalDiffuseMapMaterial> |
CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
qmake: | QT += 3dextras |
を継承する: | Qt3DRender::QMaterial |
継承者: qmake | |
ステータス | 非推奨 |
このクラスは非推奨です。新しいコードで使用しないことを強くお勧めします。
プロパティ
|
パブリック機能
QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr) | |
virtual | ~QNormalDiffuseMapMaterial() |
QColor | ambient() const |
Qt3DRender::QAbstractTexture * | diffuse() const |
Qt3DRender::QAbstractTexture * | normal() const |
float | shininess() const |
QColor | specular() const |
float | textureScale() const |
パブリックスロット
void | setAmbient(const QColor &ambient) |
void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
void | setNormal(Qt3DRender::QAbstractTexture *normal) |
void | setShininess(float shininess) |
void | setSpecular(const QColor &specular) |
void | setTextureScale(float textureScale) |
シグナル
void | ambientChanged(const QColor &ambient) |
void | diffuseChanged(Qt3DRender::QAbstractTexture *diffuse) |
void | normalChanged(Qt3DRender::QAbstractTexture *normal) |
void | shininessChanged(float shininess) |
void | specularChanged(const QColor &specular) |
void | textureScaleChanged(float textureScale) |
詳細説明
このクラスは非推奨です。代わりに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 : Qt3DRender::QAbstractTexture*
現在のディフューズマップテクスチャを保持します。
デフォルトでは、拡散テクスチャはこれらのプロパティを持っています:
- 線形最小化フィルタと拡大フィルタ
- ミップマップが有効なリニアミップマップ
- リピートラップモードM
- 最大異方性16.0
アクセス関数:
Qt3DRender::QAbstractTexture * | diffuse() const |
void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
通知シグナル
void | diffuseChanged(Qt3DRender::QAbstractTexture *diffuse) |
normal : Qt3DRender::QAbstractTexture*
現在の法線マップテクスチャを保持します。
デフォルトでは、法線テクスチャは以下のプロパティを持ちます:
- 線形最小化フィルタと拡大フィルタ
- リピートラップモード
- 最大異方性16.0
アクセス関数:
Qt3DRender::QAbstractTexture * | normal() const |
void | setNormal(Qt3DRender::QAbstractTexture *normal) |
通知シグナル:
void | normalChanged(Qt3DRender::QAbstractTexture *normal) |
shininess : float
現在の輝度を 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) |
textureScale : float
現在のテクスチャスケールを保持します。レンダリング時にテクスチャ座標に乗数として適用されます。デフォルトは 1.0 です。
QTextureWrapMode::Repeatと組み合わせて使用すると、textureScaleは、サーフェス全体にテクスチャをタイル化する簡単な方法を提供します。例えば、4.0
のテクスチャスケールは、16 (4x4) のタイルになります。
アクセス関数
float | textureScale() const |
void | setTextureScale(float textureScale) |
通知シグナル
void | textureScaleChanged(float textureScale) |
メンバー関数ドキュメント
[explicit]
QNormalDiffuseMapMaterial::QNormalDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr)
親オブジェクトparent を持つ新しい QNormalDiffuseMapMaterial インスタンスを構築します。
[virtual noexcept]
QNormalDiffuseMapMaterial::~QNormalDiffuseMapMaterial()
QNormalDiffuseMapMaterial インスタンスを破棄します。
© 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.