gz/rendering/Material.hh
virtual bool HasEnvironmentMap() const =0
Determine if this material has a environment map.
MaterialType
An enum for the type of material.
Definition: gz/rendering/Material.hh:36
virtual void SetCastShadows(const bool _castShadows)=0
Specify if this material casts shadows.
virtual bool ReflectionEnabled() const =0
Determine if this material has a reflection.
virtual double Reflectivity() const =0
Get the reflectivity value.
STL class.
virtual void ClearEmissiveMap()=0
Removes any emissive map mapped to this material.
virtual std::string Texture() const =0
Get the URI of the texture file.
virtual void SetAmbient(const double _r, const double _g, const double _b, const double _a=1.0)=0
Set the ambient color.
virtual bool HasNormalMap() const =0
Determine if this material has a normal map.
virtual std::string RoughnessMap() const =0
Get the URI of the roughness map file.
virtual bool DepthCheckEnabled() const =0
Determine if depth buffer checking is enabled.
virtual void SetNormalMap(const std::string &_normalMap)=0
Set the material normal map.
virtual std::string FragmentShader() const =0
Get path to the fragment shader.
virtual void SetDepthMaterial(const double far, const double near)=0
Configuration for Depth Material.
virtual std::string VertexShader() const =0
Get path to the vertex shader.
virtual void ClearTexture()=0
Removes any texture mapped to this material.
virtual std::string NormalMap() const =0
Get the URI of the normal map file.
virtual bool HasRoughnessMap() const =0
Determine if this material has a roughness map.
virtual ~Material()
Deconstructor.
Definition: gz/rendering/Material.hh:51
virtual enum ShaderType ShaderType() const =0
Get the ShaderType value.
virtual ShaderParamsPtr VertexShaderParams()=0
Get params for the vertex shader.
virtual void SetVertexShader(const std::string &_path)=0
Set the vertex shader.
virtual void SetShaderType(enum ShaderType _type)=0
Set the ShaderType value.
virtual std::string EmissiveMap() const =0
Get the URI of the emissive map file.
virtual void SetDepthWriteEnabled(bool _enabled)=0
Specify if depth buffer writing is enabled.
virtual void SetRoughness(const float _roughness)=0
Set the roughness value. Only affects material of type MT_PBS.
virtual bool HasTexture() const =0
Determine if this material has a texture.
virtual float Roughness() const =0
Get the roughness value of this material.
virtual bool LightingEnabled() const =0
Determine if lighting affects this material.
virtual bool HasMetalnessMap() const =0
Determine if this material has a metalness map.
virtual void SetMetalnessMap(const std::string &_metalnessMap)=0
Set the material metalness map.
virtual void SetDiffuse(const double _r, const double _g, const double _b, const double _a=1.0)=0
Set the diffuse color.
virtual float Metalness() const =0
Get the metalness value of this material.
virtual math::Color Emissive() const =0
Get the emissive color.
virtual MaterialPtr Clone(const std::string &_name="") const =0
Clone this material.
@ MT_CLASSIC
Classic shading, i.e. variants of Phong.
Definition: gz/rendering/Material.hh:39
virtual void ClearRoughnessMap()=0
Removes any roughness map mapped to this material.
virtual std::string MetalnessMap() const =0
Get the URI of the metalness map file.
virtual std::string EnvironmentMap() const =0
Get the URI of the environment map file.
virtual void SetTransparency(const double _transparency)=0
Set the transparency value.
virtual math::Color Specular() const =0
Get the specular color.
virtual void SetLightingEnabled(const bool _enabled)=0
Specify if lighting affects this material.
virtual bool CastShadows() const =0
Determine if this material casts shadows.
virtual void SetShininess(const double _shininess)=0
Set the shininess value.
virtual void SetReflectionEnabled(const bool _enabled)=0
Specify if this material has a reflection.
virtual void SetEmissiveMap(const std::string &_emissiveMap)=0
Set the material emissive map.
virtual void CopyFrom(ConstMaterialPtr _material)=0
Copy properties from given Material.
virtual void SetFragmentShader(const std::string &_path)=0
Set the fragment shader.
Represents an object present in the scene graph. This includes sub-meshes, materials,...
Definition: gz/rendering/Object.hh:34
virtual void ClearNormalMap()=0
Removes any normal map mapped to this material.
virtual void SetSpecular(const double _r, const double _g, const double _b, const double _a=1.0)=0
Set the specular color.
virtual void SetMetalness(const float _metalness)=0
Set the metalness value. Only affects material of type MT_PBS.
virtual bool HasEmissiveMap() const =0
Determine if this material has an emissive map.
virtual ShaderParamsPtr FragmentShaderParams()=0
Get params for the fragment shader.
virtual void SetReceiveShadows(const bool _receiveShadows)=0
Specify if this material receives shadows.
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 ClearEnvironmentMap()=0
Removes any environment map mapped to this material.
virtual void SetRoughnessMap(const std::string &_roughnessMap)=0
Set the material roughness map.
virtual void SetEmissive(const double _r, const double _g, const double _b, const double _a=1.0)=0
Set the emissive color.
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
virtual bool ReceiveShadows() const =0
Determine if this material receives shadows.
virtual void SetDepthCheckEnabled(bool _enabled)=0
Specify if depth buffer checking is enabled.
virtual double Transparency() const =0
Get the transparency value.
virtual void SetTexture(const std::string &_texture)=0
Set the material texture.
virtual void ClearMetalnessMap()=0
Removes any metalness map mapped to this material.
virtual enum MaterialType Type() const =0
Removes any metalness map mapped to this material.
virtual void SetReflectivity(const double _reflectivity)=0
Set the reflectivity value.
virtual void SetEnvironmentMap(const std::string &_metalnessMap)=0
Set the material environment map.
virtual bool DepthWriteEnabled() const =0
Determine if depth buffer writing is enabled.