gz/rendering/base/BaseMaterial.hh
virtual math::Color Diffuse() const override
Get the diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:473
virtual void SetDepthMaterial(const double far, const double near) override
Configuration for Depth Material.
Definition: gz/rendering/base/BaseMaterial.hh:891
virtual void SetEmissive(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:388
MaterialType
An enum for the type of material.
Definition: gz/rendering/Material.hh:36
double transparency
Transparent. 1: fully transparent, 0: opaque.
Definition: gz/rendering/base/BaseMaterial.hh:302
virtual bool HasEnvironmentMap() const override
Determine if this material has a environment map.
Definition: gz/rendering/base/BaseMaterial.hh:718
virtual void ClearMetalnessMap() override
Removes any metalness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:711
virtual void Reset()
Definition: gz/rendering/base/BaseMaterial.hh:899
virtual float Roughness() const override
Get the roughness value of this material.
Definition: gz/rendering/base/BaseMaterial.hh:781
virtual double Reflectivity() const override
Get the reflectivity value.
Definition: gz/rendering/base/BaseMaterial.hh:508
STL class.
math::Color ambient
Ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:290
virtual void SetShininess(const double _shininess) override
Set the shininess value.
Definition: gz/rendering/base/BaseMaterial.hh:403
virtual void SetReceiveShadows(const bool _receiveShadows) override
Specify if this material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:459
BaseMaterial()
Definition: gz/rendering/base/BaseMaterial.hh:331
std::string RoughnessMap() const
virtual void SetDiffuse(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:358
bool lightingEnabled
Flag to indicate if dynamic lighting is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:311
virtual float Metalness() const override
Get the metalness value of this material.
Definition: gz/rendering/base/BaseMaterial.hh:795
std::string NormalMap() const
virtual std::string FragmentShader() const override
Get path to the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:585
bool castShadows
Set to true to enable object with this material to cast shadows.
Definition: gz/rendering/base/BaseMaterial.hh:326
bool depthCheckEnabled
Flag to indicate if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:314
virtual void SetFragmentShader(const std::string &_path) override
Set the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:599
virtual std::string Texture() const override
Get the URI of the texture file.
Definition: gz/rendering/base/BaseMaterial.hh:613
virtual void SetAmbient(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:343
virtual enum ShaderType ShaderType() const override
Get the ShaderType value.
Definition: gz/rendering/base/BaseMaterial.hh:244
virtual void SetDepthWriteEnabled(bool _enabled) override
Specify if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:445
virtual void SetDepthCheckEnabled(bool _enabled) override
Specify if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:438
virtual std::string EmissiveMap() const override
Get the URI of the emissive map file.
Definition: gz/rendering/base/BaseMaterial.hh:753
double Shininess() const
virtual void SetVertexShader(const std::string &_path) override
Set the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:578
virtual void SetRoughness(const float _roughness) override
Set the roughness value. Only affects material of type MT_PBS.
Definition: gz/rendering/base/BaseMaterial.hh:774
virtual MaterialType Type() const override
Removes any metalness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:557
bool depthWriteEnabled
Flag to indicate if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:317
virtual void SetReflectionEnabled(const bool _enabled) override
Specify if this material has a reflection.
Definition: gz/rendering/base/BaseMaterial.hh:424
virtual std::string VertexShader() const override
Get path to the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:564
virtual bool HasMetalnessMap() const override
Determine if this material has a metalness map.
Definition: gz/rendering/base/BaseMaterial.hh:690
Definition: gz/rendering/base/BaseMaterial.hh:38
virtual double Transparency() const override
Get the transparency value.
Definition: gz/rendering/base/BaseMaterial.hh:501
std::string TextureImage() const
virtual bool HasEmissiveMap() const override
Determine if this material has an emissive map.
Definition: gz/rendering/base/BaseMaterial.hh:746
virtual MaterialPtr Clone(const std::string &_name="") const override
Clone this material.
Definition: gz/rendering/base/BaseMaterial.hh:802
math::Color specular
Specular color.
Definition: gz/rendering/base/BaseMaterial.hh:296
virtual void SetEnvironmentMap(const std::string &_metalnessMap) override
Set the material environment map.
Definition: gz/rendering/base/BaseMaterial.hh:732
Pbr * PbrMaterial() const
virtual bool CastShadows() const override
Determine if this material casts shadows.
Definition: gz/rendering/base/BaseMaterial.hh:515
virtual bool HasRoughnessMap() const override
Determine if this material has a roughness map.
Definition: gz/rendering/base/BaseMaterial.hh:662
virtual void SetShaderType(enum ShaderType _type) override
Set the ShaderType value.
Definition: gz/rendering/base/BaseMaterial.hh:237
static const common::Pbr kDefaultPbr
Default pbr material properties.
Definition: gz/rendering/base/BaseMaterial.hh:35
math::Color Emissive() const
std::string MetalnessMap() const
virtual void SetCastShadows(const bool _castShadows) override
Specify if this material casts shadows.
Definition: gz/rendering/base/BaseMaterial.hh:452
virtual void SetLightingEnabled(const bool _enabled) override
Specify if lighting affects this material.
Definition: gz/rendering/base/BaseMaterial.hh:431
virtual bool HasTexture() const override
Determine if this material has a texture.
Definition: gz/rendering/base/BaseMaterial.hh:606
virtual std::string EnvironmentMap() const override
Get the URI of the environment map file.
Definition: gz/rendering/base/BaseMaterial.hh:725
virtual math::Color Ambient() const override
Get the ambient color.
Definition: gz/rendering/base/BaseMaterial.hh:466
virtual void SetMetalnessMap(const std::string &_metalnessMap) override
Set the material metalness map.
Definition: gz/rendering/base/BaseMaterial.hh:704
virtual math::Color Emissive() const override
Get the emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:487
virtual void ClearNormalMap() override
Removes any normal map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:655
double shininess
Shininess factor.
Definition: gz/rendering/base/BaseMaterial.hh:305
virtual ShaderParamsPtr FragmentShaderParams() override
Get params for the fragment shader.
Definition: gz/rendering/base/BaseMaterial.hh:592
virtual bool DepthCheckEnabled() const override
Determine if depth buffer checking is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:536
bool reflectionEnabled
Flag to indicate if reflection is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:320
std::string EnvironmentMap() const
bool receiveShadows
True if material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:323
virtual bool LightingEnabled() const override
Determine if lighting affects this material.
Definition: gz/rendering/base/BaseMaterial.hh:529
virtual std::string MetalnessMap() const override
Get the URI of the metalness map file.
Definition: gz/rendering/base/BaseMaterial.hh:697
virtual void ClearEmissiveMap() override
Removes any emissive map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:767
@ MT_CLASSIC
Classic shading, i.e. variants of Phong.
Definition: gz/rendering/Material.hh:39
virtual void SetReflectivity(const double _reflectivity) override
Set the reflectivity value.
Definition: gz/rendering/base/BaseMaterial.hh:417
math::Color diffuse
Diffuse color.
Definition: gz/rendering/base/BaseMaterial.hh:293
virtual double Shininess() const override
Get the shininess value.
Definition: gz/rendering/base/BaseMaterial.hh:494
virtual std::string RoughnessMap() const override
Get the URI of the roughness map file.
Definition: gz/rendering/base/BaseMaterial.hh:669
virtual bool ReceiveShadows() const override
Determine if this material receives shadows.
Definition: gz/rendering/base/BaseMaterial.hh:522
double reflectivity
Reflectivity.
Definition: gz/rendering/base/BaseMaterial.hh:308
std::string EmissiveMap() const
double Metalness() const
@ ST_PIXEL
Per pixel lighting shader.
Definition: gz/rendering/ShaderType.hh:40
virtual void ClearEnvironmentMap() override
Removes any environment map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:739
virtual void CopyFrom(ConstMaterialPtr _material) override
Copy properties from given Material.
Definition: gz/rendering/base/BaseMaterial.hh:816
math::Color Diffuse() const
virtual std::string NormalMap() const override
Get the URI of the normal map file.
Definition: gz/rendering/base/BaseMaterial.hh:641
bool Lighting() const
virtual void SetNormalMap(const std::string &_normalMap) override
Set the material normal map.
Definition: gz/rendering/base/BaseMaterial.hh:648
virtual ShaderParamsPtr VertexShaderParams() override
Get params for the vertex shader.
Definition: gz/rendering/base/BaseMaterial.hh:571
virtual bool ReflectionEnabled() const override
Determine if this material has a reflection.
Definition: gz/rendering/base/BaseMaterial.hh:550
double Roughness() const
virtual void SetSpecular(const double _r, const double _g, const double _b, const double _a=1.0) override
Set the specular color.
Definition: gz/rendering/base/BaseMaterial.hh:373
virtual math::Color Specular() const override
Get the specular color.
Definition: gz/rendering/base/BaseMaterial.hh:480
virtual bool DepthWriteEnabled() const override
Determine if depth buffer writing is enabled.
Definition: gz/rendering/base/BaseMaterial.hh:543
virtual void SetMetalness(const float _metalness) override
Set the metalness value. Only affects material of type MT_PBS.
Definition: gz/rendering/base/BaseMaterial.hh:788
ShaderType
Available types of shaders. Note that not all rendering-engines will be able to use each type....
Definition: gz/rendering/ShaderType.hh:34
virtual void SetTexture(const std::string &_texture) override
Set the material texture.
Definition: gz/rendering/base/BaseMaterial.hh:620
virtual void SetTransparency(const double _transparency) override
Set the transparency value.
Definition: gz/rendering/base/BaseMaterial.hh:410
virtual bool HasNormalMap() const override
Determine if this material has a normal map.
Definition: gz/rendering/base/BaseMaterial.hh:634
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
virtual ~BaseMaterial()
Definition: gz/rendering/base/BaseMaterial.hh:337
math::Color emissive
Emissive color.
Definition: gz/rendering/base/BaseMaterial.hh:299
double Transparency() const
virtual void SetEmissiveMap(const std::string &_emissiveMap) override
Set the material emissive map.
Definition: gz/rendering/base/BaseMaterial.hh:760
virtual void PreRender() override
Prepare this object and any of its children for rendering. This should be called for each object in a...
Definition: gz/rendering/base/BaseMaterial.hh:884
virtual void SetRoughnessMap(const std::string &_roughnessMap) override
Set the material roughness map.
Definition: gz/rendering/base/BaseMaterial.hh:676
math::Color Ambient() const
virtual void ClearRoughnessMap() override
Removes any roughness map mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:683
math::Color Specular() const
virtual void ClearTexture() override
Removes any texture mapped to this material.
Definition: gz/rendering/base/BaseMaterial.hh:627