Qt3DExtras::QNormalDiffuseSpecularMapMaterial Class
class Qt3DExtras::QNormalDiffuseSpecularMapMaterialQNormalDiffuseSpecularMapMaterial は、フオン照明とバンプ効果のデフォルトの実装を提供します。この実装では、拡散光成分と鏡面反射光成分がテクスチャマップから読み込まれ、レンダリング対象のメッシュの法線は法線テクスチャマップから読み込まれます。詳細...
| ヘッダー: | #include <qnormaldiffusespecularmapmaterial.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| 継承元: | Qt3DRender::QMaterial |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
|
パブリック関数
| QNormalDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QNormalDiffuseSpecularMapMaterial() |
| QColor | ambient() const |
| Qt3DRender::QAbstractTexture * | diffuse() const |
| Qt3DRender::QAbstractTexture * | normal() const |
| float | shininess() const |
| Qt3DRender::QAbstractTexture * | 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(Qt3DRender::QAbstractTexture *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(Qt3DRender::QAbstractTexture *specular) |
| void | textureScaleChanged(float textureScale) |
詳細な説明
このクラスは非推奨です。代わりにQDiffuseSpecularMaterial を使用してください。
スペキュラー照明効果は、アンビエント、ディフューズ、スペキュラーという 3 つの照明コンポーネントの組み合わせに基づいています。これらのコンポーネントの相対的な強度は、RGB 3 色値としてモデル化された反射率係数によって制御されます。
- アンビエントとは、他の光源がない状態でオブジェクトから放出される色です。
- ディフューズとは、光が粗い表面で反射した際に発せられる色です。
- スペキュラーは、光が光沢のある表面で反射した際に放出される色です。
- 表面の光沢度は、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*
現在のディフューズマップテクスチャを保持します。
デフォルトでは、ディフューズテクスチャには以下の特性があります:
- リニアな縮小および拡大フィルター
- ミップマッピングが有効な線形ミップマップ
- リピート・ラップモード
- 最大異方性係数 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 | shininess() const |
| void | setShininess(float shininess) |
通知シグナル:
| void | shininessChanged(float shininess) |
specular : Qt3DRender::QAbstractTexture*
現在のスペキュラーマップテクスチャを保持します。
デフォルトでは、スペキュラーテクスチャには以下の特性があります:
- 線形縮小および拡大フィルタ
- ミップマッピングが有効な線形ミップマップ
- リピート・ラップモード
- 最大異方性係数 16.0
アクセス関数:
| Qt3DRender::QAbstractTexture * | specular() const |
| void | setSpecular(Qt3DRender::QAbstractTexture *specular) |
通知信号:
| void | specularChanged(Qt3DRender::QAbstractTexture *specular) |
textureScale : float
現在のテクスチャスケールを保持します。これは、レンダリング時にテクスチャ座標に対する乗数として適用されます。デフォルト値は 1.0 です。
QTextureWrapMode::Repeat と組み合わせて使用すると、textureScale により、サーフェス全体にテクスチャをタイル状に配置する簡単な方法が得られます。たとえば、textureScale を4.0 に設定すると、16 個(4×4)のタイルが生成されます。
アクセス関数:
| float | textureScale() const |
| void | setTextureScale(float textureScale) |
通知シグナル:
| void | textureScaleChanged(float textureScale) |
メンバ関数のドキュメント
[explicit] QNormalDiffuseSpecularMapMaterial::QNormalDiffuseSpecularMapMaterial(Qt3DCore::QNode *parent = nullptr)
親オブジェクトとしてparent を持つ、新しいQNormalDiffuseSpecularMapMaterialインスタンスを作成します。
[virtual noexcept] QNormalDiffuseSpecularMapMaterial::~QNormalDiffuseSpecularMapMaterial()
QNormalDiffuseSpecularMapMaterial インスタンスを破棄します。
© 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.