Gazebo Rendering

API Reference

9.0.0
Material Class Referenceabstract

Represents a surface material of a Geometry. More...

#include <gz/rendering/Material.hh>

Public Member Functions

virtual ~Material ()
 Destructor.
 
virtual double AlphaThreshold () const =0
 Get the alpha threshold.
 
virtual math::Color Ambient () const =0
 Get the ambient color.
 
virtual bool CastShadows () const =0
 Determine if this material casts shadows.
 
virtual void ClearEmissiveMap ()=0
 Removes any emissive map mapped to this material.
 
virtual void ClearEnvironmentMap ()=0
 Removes any environment map mapped to this material.
 
virtual void ClearLightMap ()=0
 Removes any light map mapped to this material.
 
virtual void ClearMetalnessMap ()=0
 Removes any metalness map mapped to this material.
 
virtual void ClearNormalMap ()=0
 Removes any normal map mapped to this material.
 
virtual void ClearRoughnessMap ()=0
 Removes any roughness map mapped to this material.
 
virtual void ClearTexture ()=0
 Removes any texture mapped to this material.
 
virtual MaterialPtr Clone (const std::string &_name="") const =0
 Clone this material.
 
virtual void CopyFrom (const common::Material &_material)=0
 Copy properties from given Material.
 
virtual void CopyFrom (ConstMaterialPtr _material)=0
 Copy properties from given Material.
 
virtual bool DepthCheckEnabled () const =0
 Determine if depth buffer checking is enabled.
 
virtual bool DepthWriteEnabled () const =0
 Determine if depth buffer writing is enabled.
 
virtual math::Color Diffuse () const =0
 Get the diffuse color.
 
virtual math::Color Emissive () const =0
 Get the emissive color.
 
virtual std::string EmissiveMap () const =0
 Get the URI of the emissive map file.
 
virtual std::shared_ptr< const common::ImageEmissiveMapData () const =0
 Get the emissive map data.
 
virtual std::string EnvironmentMap () const =0
 Get the URI of the environment map file.
 
virtual std::shared_ptr< const common::ImageEnvironmentMapData () const =0
 Get the environment map data.
 
virtual std::string FragmentShader () const =0
 Get path to the fragment shader.
 
virtual ShaderParamsPtr FragmentShaderParams ()=0
 Get params for the fragment shader.
 
virtual bool HasEmissiveMap () const =0
 Determine if this material has an emissive map.
 
virtual bool HasEnvironmentMap () const =0
 Determine if this material has a environment map.
 
virtual bool HasLightMap () const =0
 Determine if this material has a light map.
 
virtual bool HasMetalnessMap () const =0
 Determine if this material has a metalness map.
 
virtual bool HasNormalMap () const =0
 Determine if this material has a normal map.
 
virtual bool HasRoughnessMap () const =0
 Determine if this material has a roughness map.
 
virtual bool HasTexture () const =0
 Determine if this material has a texture.
 
virtual bool LightingEnabled () const =0
 Determine if lighting affects this material.
 
virtual std::string LightMap () const =0
 Get the URI of the light map file.
 
virtual std::shared_ptr< const common::ImageLightMapData () const =0
 Get the light map data.
 
virtual unsigned int LightMapTexCoordSet () const =0
 Get the texture coordinate set used by lightmap.
 
virtual float Metalness () const =0
 Get the metalness value of this material.
 
virtual std::string MetalnessMap () const =0
 Get the URI of the metalness map file.
 
virtual std::shared_ptr< const common::ImageMetalnessMapData () const =0
 Get the metalness map data.
 
virtual std::string NormalMap () const =0
 Get the URI of the normal map file.
 
virtual std::shared_ptr< const common::ImageNormalMapData () const =0
 Get the normal map data.
 
virtual bool ReceiveShadows () const =0
 Determine if this material receives shadows.
 
virtual bool ReflectionEnabled () const =0
 Determine if this material has a reflection.
 
virtual double Reflectivity () const =0
 Get the reflectivity value.
 
virtual float RenderOrder () const =0
 Get the render order value of this material.
 
virtual float Roughness () const =0
 Get the roughness value of this material.
 
virtual std::string RoughnessMap () const =0
 Get the URI of the roughness map file.
 
virtual std::shared_ptr< const common::ImageRoughnessMapData () const =0
 Get the roughness map data.
 
virtual void SetAlphaFromTexture (bool _enabled, double _alpha=0.5, bool _twoSided=true)=0
 Set the material to use the alpha channel from the textures.
 
virtual void SetAmbient (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the ambient color.
 
virtual void SetAmbient (const math::Color &_color)=0
 Set the ambient color.
 
virtual void SetCastShadows (const bool _castShadows)=0
 Specify if this material casts shadows.
 
virtual void SetDepthCheckEnabled (bool _enabled)=0
 Specify if depth buffer checking is enabled.
 
virtual void SetDepthMaterial (const double far, const double near)=0
 Configuration for Depth Material.
 
virtual void SetDepthWriteEnabled (bool _enabled)=0
 Specify if depth buffer writing is enabled.
 
virtual void SetDiffuse (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the diffuse color.
 
virtual void SetDiffuse (const math::Color &_color)=0
 Set the diffuse color.
 
virtual void SetEmissive (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the emissive color.
 
virtual void SetEmissive (const math::Color &_color)=0
 Set the emissive color.
 
virtual void SetEmissiveMap (const std::string &_emissiveMap)
 Set the material emissive map.
 
virtual void SetEmissiveMap (const std::string &_emissiveMap, const std::shared_ptr< const common::Image > &_img)
 Set the material emissive map.
 
virtual void SetEnvironmentMap (const std::string &_environmentMap)
 Set the material environment map.
 
virtual void SetEnvironmentMap (const std::string &_environmentMap, const std::shared_ptr< const common::Image > &_img)
 Set the material environment map.
 
virtual void SetFragmentShader (const std::string &_path)=0
 Set the fragment shader.
 
virtual void SetLightingEnabled (const bool _enabled)=0
 Specify if lighting affects this material.
 
virtual void SetLightMap (const std::string &_lightMap, const std::shared_ptr< const common::Image > &_img, unsigned int _uvSet=0)
 Set the material light map from an image loaded in memory.
 
virtual void SetLightMap (const std::string &_lightMap, unsigned int _uvSet=0u)
 Set the material light map.
 
virtual void SetMetalness (const float _metalness)=0
 Set the metalness value. Only affects material of type MT_PBS.
 
virtual void SetMetalnessMap (const std::string &_metalnessMap)
 Set the material metalness map.
 
virtual void SetMetalnessMap (const std::string &_metalnessMap, const std::shared_ptr< const common::Image > &_img)
 Set the material metalness map.
 
virtual void SetNormalMap (const std::string &_normalMap)
 Set the material normal map.
 
virtual void SetNormalMap (const std::string &_normalMap, const std::shared_ptr< const common::Image > &_img)
 Set the material normal map.
 
virtual void SetReceiveShadows (const bool _receiveShadows)=0
 Specify if this material receives shadows.
 
virtual void SetReflectionEnabled (const bool _enabled)=0
 Specify if this material has a reflection.
 
virtual void SetReflectivity (const double _reflectivity)=0
 Set the reflectivity value.
 
virtual void SetRenderOrder (const float _renderOrder)=0
 Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel. This param help to avoid this problem.
 
virtual void SetRoughness (const float _roughness)=0
 Set the roughness value. Only affects material of type MT_PBS.
 
virtual void SetRoughnessMap (const std::string &_roughnessMap)
 Set the material roughness map.
 
virtual void SetRoughnessMap (const std::string &_roughnessMap, const std::shared_ptr< const common::Image > &_img)
 Set the material roughness map.
 
virtual void SetShaderType (enum ShaderType _type)=0
 Set the ShaderType value.
 
virtual void SetShininess (const double _shininess)=0
 Set the shininess value.
 
virtual void SetSpecular (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the specular color.
 
virtual void SetSpecular (const math::Color &_color)=0
 Set the specular color.
 
virtual void SetTexture (const std::string &_texture)
 Set the material texture.
 
virtual void SetTexture (const std::string &_texture, const std::shared_ptr< const common::Image > &_img)
 Set the material texture.
 
virtual void SetTransparency (const double _transparency)=0
 Set the transparency value.
 
virtual void SetVertexShader (const std::string &_path)=0
 Set the vertex shader.
 
virtual enum ShaderType ShaderType () const =0
 Get the ShaderType value.
 
virtual double Shininess () const =0
 Get the shininess value.
 
virtual math::Color Specular () const =0
 Get the specular color.
 
virtual std::string Texture () const =0
 Get the URI of the texture file.
 
virtual bool TextureAlphaEnabled () const =0
 Get the enable alpha from textures.
 
virtual std::shared_ptr< const common::ImageTextureData () const =0
 Get the texture data.
 
virtual double Transparency () const =0
 Get the transparency value.
 
virtual bool TwoSidedEnabled () const =0
 Get the enable two sided rendering value.
 
virtual enum MaterialType Type () const =0
 Removes any metalness map mapped to this material.
 
virtual std::string VertexShader () const =0
 Get path to the vertex shader.
 
virtual ShaderParamsPtr VertexShaderParams ()=0
 Get params for the vertex shader.
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Destructor.
 
virtual void Destroy ()=0
 Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior.
 
virtual unsigned int Id () const =0
 Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes.
 
virtual std::string Name () const =0
 Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes.
 
virtual void PostRender ()=0
 Post process this object and any of its children after rendering.
 
virtual void PreRender ()=0
 Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.
 
virtual ScenePtr Scene () const =0
 Get the Scene that created this object.
 

Detailed Description

Represents a surface material of a Geometry.

Constructor & Destructor Documentation

◆ ~Material()

virtual ~Material ( )
virtual

Destructor.

Member Function Documentation

◆ AlphaThreshold()

virtual double AlphaThreshold ( ) const
pure virtual

Get the alpha threshold.

Returns
The alpha threshold value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ Ambient()

virtual math::Color Ambient ( ) const
pure virtual

Get the ambient color.

Returns
The ambient color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ CastShadows()

virtual bool CastShadows ( ) const
pure virtual

Determine if this material casts shadows.

Returns
True if this material casts shadows

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ ClearEmissiveMap()

virtual void ClearEmissiveMap ( )
pure virtual

Removes any emissive map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ ClearEnvironmentMap()

virtual void ClearEnvironmentMap ( )
pure virtual

Removes any environment map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ ClearLightMap()

virtual void ClearLightMap ( )
pure virtual

Removes any light map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ ClearMetalnessMap()

virtual void ClearMetalnessMap ( )
pure virtual

Removes any metalness map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ ClearNormalMap()

virtual void ClearNormalMap ( )
pure virtual

Removes any normal map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ ClearRoughnessMap()

virtual void ClearRoughnessMap ( )
pure virtual

Removes any roughness map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ ClearTexture()

virtual void ClearTexture ( )
pure virtual

Removes any texture mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Clone()

virtual MaterialPtr Clone ( const std::string _name = "") const
pure virtual

Clone this material.

Returns
New cloned material

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ CopyFrom() [1/2]

virtual void CopyFrom ( const common::Material _material)
pure virtual

Copy properties from given Material.

Parameters
[in]_materialSource Material to be copied from

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ CopyFrom() [2/2]

virtual void CopyFrom ( ConstMaterialPtr  _material)
pure virtual

Copy properties from given Material.

Parameters
[in]_materialSource Material to be copied from

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ DepthCheckEnabled()

virtual bool DepthCheckEnabled ( ) const
pure virtual

Determine if depth buffer checking is enabled.

Returns
True if depth check is enabled

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ DepthWriteEnabled()

virtual bool DepthWriteEnabled ( ) const
pure virtual

Determine if depth buffer writing is enabled.

Returns
True if depth buffer writing is enabled

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Diffuse()

virtual math::Color Diffuse ( ) const
pure virtual

Get the diffuse color.

Returns
The diffuse color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Emissive()

virtual math::Color Emissive ( ) const
pure virtual

Get the emissive color.

Returns
The emissive color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ EmissiveMap()

virtual std::string EmissiveMap ( ) const
pure virtual

Get the URI of the emissive map file.

Returns
URI of the emissive map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ EmissiveMapData()

virtual std::shared_ptr< const common::Image > EmissiveMapData ( ) const
pure virtual

Get the emissive map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ EnvironmentMap()

virtual std::string EnvironmentMap ( ) const
pure virtual

Get the URI of the environment map file.

Returns
URI of the environment map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ EnvironmentMapData()

virtual std::shared_ptr< const common::Image > EnvironmentMapData ( ) const
pure virtual

Get the environment map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ FragmentShader()

virtual std::string FragmentShader ( ) const
pure virtual

Get path to the fragment shader.

Returns
Path to fragment shader

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ FragmentShaderParams()

virtual ShaderParamsPtr FragmentShaderParams ( )
pure virtual

Get params for the fragment shader.

Returns
editable parameters

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ HasEmissiveMap()

virtual bool HasEmissiveMap ( ) const
pure virtual

Determine if this material has an emissive map.

Returns
True if this material has an emissive map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ HasEnvironmentMap()

virtual bool HasEnvironmentMap ( ) const
pure virtual

Determine if this material has a environment map.

Returns
True if this material has a environment map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ HasLightMap()

virtual bool HasLightMap ( ) const
pure virtual

Determine if this material has a light map.

Returns
True if this material has a light map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ HasMetalnessMap()

virtual bool HasMetalnessMap ( ) const
pure virtual

Determine if this material has a metalness map.

Returns
True if this material has a metalness map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ HasNormalMap()

virtual bool HasNormalMap ( ) const
pure virtual

Determine if this material has a normal map.

Returns
True if this material has a normal map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ HasRoughnessMap()

virtual bool HasRoughnessMap ( ) const
pure virtual

Determine if this material has a roughness map.

Returns
True if this material has a roughness map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ HasTexture()

virtual bool HasTexture ( ) const
pure virtual

Determine if this material has a texture.

Returns
True if this material has a texture

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ LightingEnabled()

virtual bool LightingEnabled ( ) const
pure virtual

Determine if lighting affects this material.

Returns
True if lighting affects this material

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ LightMap()

virtual std::string LightMap ( ) const
pure virtual

Get the URI of the light map file.

Returns
URI of the light map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ LightMapData()

virtual std::shared_ptr< const common::Image > LightMapData ( ) const
pure virtual

Get the light map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ LightMapTexCoordSet()

virtual unsigned int LightMapTexCoordSet ( ) const
pure virtual

Get the texture coordinate set used by lightmap.

Returns
texture coordinate set of the light map

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ Metalness()

virtual float Metalness ( ) const
pure virtual

Get the metalness value of this material.

Returns
Material metalness

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ MetalnessMap()

virtual std::string MetalnessMap ( ) const
pure virtual

Get the URI of the metalness map file.

Returns
URI of the metalness map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ MetalnessMapData()

virtual std::shared_ptr< const common::Image > MetalnessMapData ( ) const
pure virtual

Get the metalness map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ NormalMap()

virtual std::string NormalMap ( ) const
pure virtual

Get the URI of the normal map file.

Returns
URI of the normal map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ NormalMapData()

virtual std::shared_ptr< const common::Image > NormalMapData ( ) const
pure virtual

Get the normal map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ ReceiveShadows()

virtual bool ReceiveShadows ( ) const
pure virtual

Determine if this material receives shadows.

Returns
True if this material receives shadows

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ ReflectionEnabled()

virtual bool ReflectionEnabled ( ) const
pure virtual

Determine if this material has a reflection.

Returns
True if this material has a reflection

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ Reflectivity()

virtual double Reflectivity ( ) const
pure virtual

Get the reflectivity value.

Returns
The reflectivity value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ RenderOrder()

virtual float RenderOrder ( ) const
pure virtual

Get the render order value of this material.

Returns
Material render order

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Roughness()

virtual float Roughness ( ) const
pure virtual

Get the roughness value of this material.

Returns
Material roughness

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ RoughnessMap()

virtual std::string RoughnessMap ( ) const
pure virtual

Get the URI of the roughness map file.

Returns
URI of the roughness map file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ RoughnessMapData()

virtual std::shared_ptr< const common::Image > RoughnessMapData ( ) const
pure virtual

Get the roughness map data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetAlphaFromTexture()

virtual void SetAlphaFromTexture ( bool  _enabled,
double  _alpha = 0.5,
bool  _twoSided = true 
)
pure virtual

Set the material to use the alpha channel from the textures.

Parameters
[in]_enabledEnable alpha channel based rendering
[in]_alphaSet the alpha threshold value
[in]_twoSidedEnable two sided rendering

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetAmbient() [1/2]

virtual void SetAmbient ( const double  _r,
const double  _g,
const double  _b,
const double  _a = 1.0 
)
pure virtual

Set the ambient color.

Parameters
[in]_rRed value
[in]_gGreen value
[in]_bBlue value
[in]_aAlpha value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ SetAmbient() [2/2]

virtual void SetAmbient ( const math::Color _color)
pure virtual

Set the ambient color.

Parameters
[in]_colorNew ambient color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetCastShadows()

virtual void SetCastShadows ( const bool  _castShadows)
pure virtual

Specify if this material casts shadows.

Parameters
[in]_castShadowsTrue if this material casts shadows

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetDepthCheckEnabled()

virtual void SetDepthCheckEnabled ( bool  _enabled)
pure virtual

Specify if depth buffer checking is enabled.

Parameters
[in]_enabledTrue if depth check is enabled

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetDepthMaterial()

virtual void SetDepthMaterial ( const double  far,
const double  near 
)
pure virtual

Configuration for Depth Material.

Parameters
[in]farFar distance for normalized output
[in]nearNear distance for normalized output

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetDepthWriteEnabled()

virtual void SetDepthWriteEnabled ( bool  _enabled)
pure virtual

Specify if depth buffer writing is enabled.

Parameters
[in]_enabledTrue if depth buffer writing is enabled

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetDiffuse() [1/2]

virtual void SetDiffuse ( const double  _r,
const double  _g,
const double  _b,
const double  _a = 1.0 
)
pure virtual

Set the diffuse color.

Parameters
[in]_rRed value
[in]_gGreen value
[in]_bBlue value
[in]_aAlpha value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ SetDiffuse() [2/2]

virtual void SetDiffuse ( const math::Color _color)
pure virtual

Set the diffuse color.

Parameters
[in]_colorNew diffuse color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetEmissive() [1/2]

virtual void SetEmissive ( const double  _r,
const double  _g,
const double  _b,
const double  _a = 1.0 
)
pure virtual

Set the emissive color.

Parameters
[in]_rRed value
[in]_gGreen value
[in]_bBlue value
[in]_aAlpha value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ SetEmissive() [2/2]

virtual void SetEmissive ( const math::Color _color)
pure virtual

Set the emissive color.

Parameters
[in]_colorNew emissive color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetEmissiveMap() [1/2]

virtual void SetEmissiveMap ( const std::string _emissiveMap)
inlinevirtual

Set the material emissive map.

Parameters
[in]_emissiveMapMap URI of the new emissive map file

References Material::SetEmissiveMap().

Referenced by Material::SetEmissiveMap().

◆ SetEmissiveMap() [2/2]

virtual void SetEmissiveMap ( const std::string _emissiveMap,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material emissive map.

Parameters
[in]_emissiveMapMap URI of the new emissive map file, or identifying name if map was set from raw data
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetEnvironmentMap() [1/2]

virtual void SetEnvironmentMap ( const std::string _environmentMap)
inlinevirtual

Set the material environment map.

Parameters
[in]_environmentMapURI of the new environment map file

References Material::SetEnvironmentMap().

Referenced by Material::SetEnvironmentMap().

◆ SetEnvironmentMap() [2/2]

virtual void SetEnvironmentMap ( const std::string _environmentMap,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material environment map.

Parameters
[in]_environmentMapURI of the new environment map file, or identifying name if map was set from raw data
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetFragmentShader()

virtual void SetFragmentShader ( const std::string _path)
pure virtual

Set the fragment shader.

Parameters
[in]_pathpath to a file containing a glsl shader

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetLightingEnabled()

virtual void SetLightingEnabled ( const bool  _enabled)
pure virtual

Specify if lighting affects this material.

Parameters
[in]_enabledTrue if lighting affects this material

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetLightMap() [1/2]

virtual void SetLightMap ( const std::string _lightMap,
const std::shared_ptr< const common::Image > &  _img,
unsigned int  _uvSet = 0 
)
inlinevirtual

Set the material light map from an image loaded in memory.

Parameters
[in]_lightMapURI of the new light map file
[in]_imgImage data, nullptr if the image should be loaded from a file
[in]_uvSetTexture coordinate set to use

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetLightMap() [2/2]

virtual void SetLightMap ( const std::string _lightMap,
unsigned int  _uvSet = 0u 
)
inlinevirtual

Set the material light map.

Parameters
[in]_lightMapURI of the new light map file
[in]_uvSetTexture coordinate set to use

References Material::SetLightMap().

Referenced by Material::SetLightMap().

◆ SetMetalness()

virtual void SetMetalness ( const float  _metalness)
pure virtual

Set the metalness value. Only affects material of type MT_PBS.

Parameters
[in]_metalnessMetalness to set to

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetMetalnessMap() [1/2]

virtual void SetMetalnessMap ( const std::string _metalnessMap)
inlinevirtual

Set the material metalness map.

Parameters
[in]_metalnessMapURI of the new metalness map file

References Material::SetMetalnessMap().

Referenced by Material::SetMetalnessMap().

◆ SetMetalnessMap() [2/2]

virtual void SetMetalnessMap ( const std::string _metalnessMap,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material metalness map.

Parameters
[in]_metalnessMapURI of the new metalness map file, or identifying name if map was set from raw data
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetNormalMap() [1/2]

virtual void SetNormalMap ( const std::string _normalMap)
inlinevirtual

Set the material normal map.

Parameters
[in]_normalMapURI of the new normal map file

References Material::SetNormalMap().

Referenced by Material::SetNormalMap().

◆ SetNormalMap() [2/2]

virtual void SetNormalMap ( const std::string _normalMap,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material normal map.

Parameters
[in]_normalMapURI of the new normal map file, or identifying name if map was set from raw data
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, Ogre2Material, and OgreMaterial.

◆ SetReceiveShadows()

virtual void SetReceiveShadows ( const bool  _receiveShadows)
pure virtual

Specify if this material receives shadows.

Parameters
[in]_receiveShadowsTrue if this material receives shadows

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetReflectionEnabled()

virtual void SetReflectionEnabled ( const bool  _enabled)
pure virtual

Specify if this material has a reflection.

Parameters
[in]_enabledTrue if this material has a reflection

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetReflectivity()

virtual void SetReflectivity ( const double  _reflectivity)
pure virtual

Set the reflectivity value.

Parameters
[in]_reflectivityNew reflectivity value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetRenderOrder()

virtual void SetRenderOrder ( const float  _renderOrder)
pure virtual

Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel. This param help to avoid this problem.

Parameters
[in]_renderOrderRender order to set to

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetRoughness()

virtual void SetRoughness ( const float  _roughness)
pure virtual

Set the roughness value. Only affects material of type MT_PBS.

Parameters
[in]_roughnessRoughness to set to

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetRoughnessMap() [1/2]

virtual void SetRoughnessMap ( const std::string _roughnessMap)
inlinevirtual

Set the material roughness map.

Parameters
[in]_roughnessMapURI of the new roughness map file

References Material::SetRoughnessMap().

Referenced by Material::SetRoughnessMap().

◆ SetRoughnessMap() [2/2]

virtual void SetRoughnessMap ( const std::string _roughnessMap,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material roughness map.

Parameters
[in]_roughnessMapURI of the new roughness map file, or identifying name if map was set from raw data
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ SetShaderType()

virtual void SetShaderType ( enum ShaderType  _type)
pure virtual

Set the ShaderType value.

Parameters
[in]_typeNew ShaderType value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetShininess()

virtual void SetShininess ( const double  _shininess)
pure virtual

Set the shininess value.

Parameters
[in]_shininessNew shininess value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ SetSpecular() [1/2]

virtual void SetSpecular ( const double  _r,
const double  _g,
const double  _b,
const double  _a = 1.0 
)
pure virtual

Set the specular color.

Parameters
[in]_rRed value
[in]_gGreen value
[in]_bBlue value
[in]_aAlpha value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ SetSpecular() [2/2]

virtual void SetSpecular ( const math::Color _color)
pure virtual

Set the specular color.

Parameters
[in]_colorNew specular color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetTexture() [1/2]

virtual void SetTexture ( const std::string _texture)
inlinevirtual

Set the material texture.

Parameters
[in]_textureURI of the new texture file or identifying name if _img is set

References Material::SetTexture().

Referenced by Material::SetTexture().

◆ SetTexture() [2/2]

virtual void SetTexture ( const std::string _texture,
const std::shared_ptr< const common::Image > &  _img 
)
inlinevirtual

Set the material texture.

Parameters
[in]_textureURI of the new texture file or identifying name if _img is set
[in]_imgImage data, nullptr if the image should be loaded from a file

Reimplemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, Ogre2Material, and OgreMaterial.

◆ SetTransparency()

virtual void SetTransparency ( const double  _transparency)
pure virtual

Set the transparency value.

Parameters
[in]_transparencyNew transparency value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ SetVertexShader()

virtual void SetVertexShader ( const std::string _path)
pure virtual

Set the vertex shader.

Parameters
[in]_pathpath to a file containing a glsl shader

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ ShaderType()

virtual enum ShaderType ShaderType ( ) const
pure virtual

Get the ShaderType value.

Returns
The ShaderType value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ Shininess()

virtual double Shininess ( ) const
pure virtual

Get the shininess value.

Returns
The shininess value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ Specular()

virtual math::Color Specular ( ) const
pure virtual

Get the specular color.

Returns
The specular color

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Texture()

virtual std::string Texture ( ) const
pure virtual

Get the URI of the texture file.

Returns
URI of the texture file

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ TextureAlphaEnabled()

virtual bool TextureAlphaEnabled ( ) const
pure virtual

Get the enable alpha from textures.

Returns
The enable alpha value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ TextureData()

virtual std::shared_ptr< const common::Image > TextureData ( ) const
pure virtual

Get the texture data.

Returns
Pointer to the common::Image with the data if the texture was loaded from memory

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ Transparency()

virtual double Transparency ( ) const
pure virtual

Get the transparency value.

Returns
The transparency value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and OgreMaterial.

◆ TwoSidedEnabled()

virtual bool TwoSidedEnabled ( ) const
pure virtual

Get the enable two sided rendering value.

Returns
The enable two sided rendering value

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, and BaseMaterial< OgreObject >.

◆ Type()

virtual enum MaterialType Type ( ) const
pure virtual

Removes any metalness map mapped to this material.

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, and Ogre2Material.

◆ VertexShader()

virtual std::string VertexShader ( ) const
pure virtual

Get path to the vertex shader.

Returns
Path to vertex shader

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.

◆ VertexShaderParams()

virtual ShaderParamsPtr VertexShaderParams ( )
pure virtual

Get params for the vertex shader.

Returns
editable parameters

Implemented in BaseMaterial< T >, BaseMaterial< Ogre2Object >, BaseMaterial< OgreObject >, OgreMaterial, and Ogre2Material.


The documentation for this class was generated from the following file: