Qt3DExtras::QMetalRoughMaterial Class
class Qt3DExtras::QMetalRoughMaterialQMetalRoughMaterial は、PBR ライティングのデフォルトの実装を提供します。詳細...
| ヘッダー: | #include <qmetalroughmaterial.h> |
| CMake: | find_package(Qt6 REQUIRED COMPONENTS 3dextras) target_link_libraries(mytarget PRIVATE Qt6::3dextras) |
| qmake: | QT += 3dextras |
| QML内: | MetalRoughMaterial |
| 継承元: | Qt3DRender::QMaterial |
| ステータス: | 非推奨 |
このクラスは非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
|
|
パブリック関数
| QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr) | |
| virtual | ~QMetalRoughMaterial() |
| QVariant | ambientOcclusion() const |
| QVariant | baseColor() const |
| QVariant | metalness() const |
| QVariant | normal() const |
| QVariant | roughness() const |
| float | textureScale() const |
パブリックスロット
| void | setAmbientOcclusion(const QVariant &ambientOcclusion) |
| void | setBaseColor(const QVariant &baseColor) |
| void | setMetalness(const QVariant &metalness) |
| void | setNormal(const QVariant &normal) |
| void | setRoughness(const QVariant &roughness) |
| void | setTextureScale(float textureScale) |
シグナル
| void | ambientOcclusionChanged(const QVariant &ambientOcclusion) |
| void | baseColorChanged(const QVariant &baseColor) |
| void | metalnessChanged(const QVariant &metalness) |
| void | normalChanged(const QVariant &normal) |
| void | roughnessChanged(const QVariant &roughness) |
| void | textureScaleChanged(float textureScale) |
詳細な説明
このマテリアルは、単一のレンダリングパス方式によるエフェクトを使用し、フラグメントごとのライティングを実行します。OpenGL 3 および OpenGL ES 3 向けのテクニックが提供されています。
プロパティのドキュメント
ambientOcclusion : QVariant
マテリアルの現在のアンビエントオクルージョンマップテクスチャを保持します。これはテクスチャである必要があり、それ以外の場合は無視されます。デフォルトでは、このマップは設定されていません。
アクセス関数:
| QVariant | ambientOcclusion() const |
| void | setAmbientOcclusion(const QVariant &ambientOcclusion) |
通知シグナル:
| void | ambientOcclusionChanged(const QVariant &ambientOcclusion) |
baseColor : QVariant
マテリアルの現在のベースカラーを保持します。これは、単色の色値またはテクスチャのいずれかです。デフォルトでは、このプロパティの値は「grey」です。
アクセス関数:
| QVariant | baseColor() const |
| void | setBaseColor(const QVariant &baseColor) |
通知シグナル:
| void | baseColorChanged(const QVariant &baseColor) |
metalness : QVariant
マテリアルの現在の金属度レベルを、0(純粋な誘電体、デフォルト)から1(純粋な金属)までの値として保持します。これは、単一の均一な値でも、テクスチャでも構いません。デフォルトでは、このプロパティの値は0です。
アクセス関数:
| QVariant | metalness() const |
| void | setMetalness(const QVariant &metalness) |
通知シグナル:
| void | metalnessChanged(const QVariant &metalness) |
normal : QVariant
マテリアルの現在のノーマルマップテクスチャを保持します。これはテクスチャである必要があり、それ以外の場合は無視されます。デフォルトでは、このマップは設定されていません。
アクセス関数:
| QVariant | normal() const |
| void | setNormal(const QVariant &normal) |
通知シグナル:
| void | normalChanged(const QVariant &normal) |
roughness : QVariant
マテリアルの現在の粗さレベルを保持します。これは、単純な均一な値でも、テクスチャでも構いません。デフォルトでは、このプロパティの値は 0 です。
アクセス関数:
| QVariant | roughness() const |
| void | setRoughness(const QVariant &roughness) |
通知シグナル:
| void | roughnessChanged(const QVariant &roughness) |
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] QMetalRoughMaterial::QMetalRoughMaterial(Qt3DCore::QNode *parent = nullptr)
親オブジェクトparent を持つ新しいQMetalRoughMaterialインスタンスを作成します。
[virtual noexcept] QMetalRoughMaterial::~QMetalRoughMaterial()
QMetalRoughMaterial インスタンスを破棄します。
© 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.