Qt3DExtras::QDiffuseMapMaterial Class
class Qt3DExtras::QDiffuseMapMaterialQDiffuseMapMaterial は、拡散光成分をテクスチャマップから読み込むフォン照明効果のデフォルトの実装を提供します。詳細...
| ヘッダー: | #include <qdiffusemapmaterial.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| 継承元: | Qt3DRender::QMaterial |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
|
パブリック関数
| QDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QDiffuseMapMaterial() |
| QColor | ambient() const |
| Qt3DRender::QAbstractTexture * | diffuse() const |
| float | shininess() const |
| QColor | specular() const |
| float | textureScale() const |
パブリックスロット
| void | setAmbient(const QColor &color) |
| void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
| void | setShininess(float shininess) |
| void | setSpecular(const QColor &specular) |
| void | setTextureScale(float textureScale) |
シグナル
| void | ambientChanged(const QColor &ambient) |
| void | diffuseChanged(Qt3DRender::QAbstractTexture *diffuse) |
| void | shininessChanged(float shininess) |
| void | specularChanged(const QColor &specular) |
| void | textureScaleChanged(float textureScale) |
詳細な説明
このクラスは非推奨です。代わりにQt3DExtras::QDiffuseSpecularMaterial を使用してください。
スペキュラー照明効果は、アンビエント、ディフューズ、スペキュラーという 3 つの照明コンポーネントの組み合わせに基づいています。これらのコンポーネントの相対的な強度は、RGB トリプレットとしてモデル化された反射率係数によって制御されます。
- アンビエントとは、他の光源がない状態でオブジェクトから放出される色のことです。
- ディフューズは、光による粗い表面の反射で発せられる色です。
- スペキュラーは、光による光沢のある表面の反射で発せられる色です。
- 表面の光沢度は、float型のプロパティによって制御されます。
このマテリアルは、シングルレンダーパス方式の効果を使用し、フラグメントごとのライティングを実行します。OpenGL 2、OpenGL 3 以降、および OpenGL ES 2 向けの技術が提供されています。
プロパティのドキュメント
ambient : QColor
現在の周囲の色を保持します。
アクセス関数:
| QColor | ambient() const |
| void | setAmbient(const QColor &color) |
通知シグナル:
| void | ambientChanged(const QColor &ambient) |
diffuse : Qt3DRender::QAbstractTexture*
ディフューズマップとして使用される現在のテクスチャを保持します。
デフォルトでは、ディフューズテクスチャには以下の特性があります:
- 線形縮小および拡大フィルタ
- ミップマッピングが有効な線形ミップマップ
- リピート・ラップモード
- 最大異方性:16.0
アクセス関数:
| Qt3DRender::QAbstractTexture * | diffuse() const |
| void | setDiffuse(Qt3DRender::QAbstractTexture *diffuse) |
通知信号:
| void | diffuseChanged(Qt3DRender::QAbstractTexture *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) |
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] QDiffuseMapMaterial::QDiffuseMapMaterial(Qt3DCore::QNode *parent = nullptr)
親オブジェクトparent を持つ新しいQDiffuseMapMaterialインスタンスを作成します。
[virtual noexcept] QDiffuseMapMaterial::~QDiffuseMapMaterial()
QDiffuseMapMaterial インスタンスを破棄します。
© 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.