Material QML Type
マテリアル用の、インスタンス化できない抽象基底クラス。詳細...
| Import Statement: | import Qt3D.Render 2.12 |
| In C++: | QMaterial |
| Inherited By: | DiffuseMapMaterial, DiffuseSpecularMapMaterial, GoochMaterial, NormalDiffuseMapAlphaMaterial, NormalDiffuseMapMaterial, NormalDiffuseSpecularMapMaterial, PerVertexColorMaterial, PhongAlphaMaterial, and PhongMaterial |
| Status: | Deprecated |
この型は非推奨です。新しいコードでの使用は強く推奨しません。
プロパティ
- effect : Effect
- parameters : list<Parameter>
詳細説明
マテリアルは、entity のレンダリング方法を指定するための手段を提供します。あらゆる側面が独自のマテリアルのサブタイプを定義できるため、マテリアルを使用して視覚的な要素を記述することができます。例えば、要素からの音の反射の仕方や、表面の温度などが挙げられます。
Material自体は、それだけでは何もしません。Effectノードを参照して初めて、Materialは有用なものとなります。
実際には、1つのEffectが複数のMaterialコンポーネントから参照されることがよくあります。これにより、エフェクト、テクニック、パス、シェーダーを一度作成するだけで済み、パラメータインスタンスを追加することでマテリアルを指定できるようになります。
マテリアルで定義されたパラメータは、エフェクト、テクニック、およびRenderPass で定義された(同名の)パラメータを上書きしますが、RenderPassFilter およびTechniqueFilter 内のパラメータには上書きされます。
Effect {
id: effect
techniques: [
Technique {
id: gl3Technique
graphicsApiFilter {
api: GraphicsApiFilter.OpenGL
profile: GraphicsApiFilter.CoreProfile
majorVersion: 3
minorVersion: 1
}
renderPasses: [
RenderPass {
id: gl3Pass
shaderProgram: ShaderProgram {
...
}
}
]
}
]
}
Material {
id: material1
parameters: [
Parameter { name: "color"; value: "green" }
]
}
Material {
id: material2
parameters: [
Parameter { name: "color"; value: "white" }
]
}「 Effect 」、「Technique 」、および「Parameter 」も参照してください 。
プロパティのドキュメント
effect : Effect
そのマテリアルで使用するエフェクトを指定します。
parameters : list<Parameter>
そのマテリアルで使用されるパラメータの一覧を保持します。
© 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.