Ignition Rendering

API Reference

0.1.0
Material Class Referenceabstract

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

#include <ignition/rendering/Material.hh>

Public Member Functions

virtual ~Material ()
 Deconstructor. More...
 
virtual math::Color Ambient () const =0
 Get the ambient color. More...
 
virtual bool CastShadows () const =0
 Determine if this material casts shadows. More...
 
virtual void ClearNormalMap ()=0
 Removes any normal map mapped to this material. More...
 
virtual void ClearTexture ()=0
 Removes any texture mapped to this material. More...
 
virtual MaterialPtr Clone (const std::string &_name="") const =0
 Clone this material. More...
 
virtual void CopyFrom (ConstMaterialPtr _material)=0
 Copy properties from given Material. More...
 
virtual void CopyFrom (const common::Material &_material)=0
 Copy properties from given Material. More...
 
virtual math::Color Diffuse () const =0
 Get the diffuse color. More...
 
virtual math::Color Emissive () const =0
 Get the emissive color. More...
 
virtual bool HasNormalMap () const =0
 Determine if this material has a normal map. More...
 
virtual bool HasTexture () const =0
 Determine if this material has a texture. More...
 
virtual bool LightingEnabled () const =0
 Determine if lighting affects this material. More...
 
virtual std::string NormalMap () const =0
 Get the URI of the normal map file. More...
 
virtual bool ReceiveShadows () const =0
 Determine if this material receives shadows. More...
 
virtual bool ReflectionEnabled () const =0
 Determine if this material has a reflection. More...
 
virtual double Reflectivity () const =0
 Get the reflectivity value. More...
 
virtual void SetAmbient (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the ambient color. More...
 
virtual void SetAmbient (const math::Color &_color)=0
 Set the ambient color. More...
 
virtual void SetCastShadows (const bool _castShadows)=0
 Specify if this material casts shadows. More...
 
virtual void SetDiffuse (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the diffuse color. More...
 
virtual void SetDiffuse (const math::Color &_color)=0
 Set the diffuse color. More...
 
virtual void SetEmissive (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the emissive color. More...
 
virtual void SetEmissive (const math::Color &_color)=0
 Set the emissive color. More...
 
virtual void SetLightingEnabled (const bool _enabled)=0
 Specify if lighting affects this material. More...
 
virtual void SetNormalMap (const std::string &_name)=0
 Set the material normal map. More...
 
virtual void SetReceiveShadows (const bool _receiveShadows)=0
 Specify if this material receives shadows. More...
 
virtual void SetReflectionEnabled (const bool _enabled)=0
 Specify if this material has a reflection. More...
 
virtual void SetReflectivity (const double _reflectivity)=0
 Set the reflectivity value. More...
 
virtual void SetShaderType (enum ShaderType _type)=0
 Set the ShaderType value. More...
 
virtual void SetShininess (const double _shininess)=0
 Set the shininess value. More...
 
virtual void SetSpecular (const double _r, const double _g, const double _b, const double _a=1.0)=0
 Set the specular color. More...
 
virtual void SetSpecular (const math::Color &_color)=0
 Set the specular color. More...
 
virtual void SetTexture (const std::string &_name)=0
 Set the material texture. More...
 
virtual void SetTransparency (const double _transparency)=0
 Set the transparency value. More...
 
virtual enum ShaderType ShaderType () const =0
 Get the ShaderType value. More...
 
virtual double Shininess () const =0
 Get the shininess value. More...
 
virtual math::Color Specular () const =0
 Get the specular color. More...
 
virtual std::string Texture () const =0
 Get the URI of the texture file. More...
 
virtual double Transparency () const =0
 Get the transparency value. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Deconstructor. More...
 
virtual void Destroy ()=0
 Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More...
 
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. More...
 
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. More...
 
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. More...
 
virtual ScenePtr Scene () const =0
 Get the Scene that created this object. More...
 

Detailed Description

Represents a surface material of a Geometry.

Constructor & Destructor Documentation

◆ ~Material()

Member Function Documentation

◆ Ambient()

virtual math::Color Ambient ( ) const
pure virtual

Get the ambient color.

Returns
The ambient color

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ CastShadows()

virtual bool CastShadows ( ) const
pure virtual

Determine if this material casts shadows.

Returns
True if this material casts shadows

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ ClearNormalMap()

virtual void ClearNormalMap ( )
pure virtual

Removes any normal map mapped to this material.

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

Referenced by Material::~Material().

◆ ClearTexture()

virtual void ClearTexture ( )
pure virtual

Removes any texture mapped to this material.

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

Referenced by Material::~Material().

◆ Clone()

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

Clone this material.

Returns
New cloned material

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

Referenced by Material::~Material().

◆ CopyFrom() [1/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 >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ CopyFrom() [2/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 >, and BaseMaterial< OgreObject >.

◆ Diffuse()

virtual math::Color Diffuse ( ) const
pure virtual

Get the diffuse color.

Returns
The diffuse color

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Emissive()

virtual math::Color Emissive ( ) const
pure virtual

Get the emissive color.

Returns
The emissive color

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ 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 OgreMaterial.

Referenced by Material::~Material().

◆ HasTexture()

virtual bool HasTexture ( ) const
pure virtual

Determine if this material has a texture.

Returns
True if this material has a texture

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ LightingEnabled()

virtual bool LightingEnabled ( ) const
pure virtual

Determine if lighting affects this material.

Returns
True if lighting affects this material

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ 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 OgreMaterial.

Referenced by Material::~Material().

◆ ReceiveShadows()

virtual bool ReceiveShadows ( ) const
pure virtual

Determine if this material receives shadows.

Returns
True if this material receives shadows

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ ReflectionEnabled()

virtual bool ReflectionEnabled ( ) const
pure virtual

Determine if this material has a reflection.

Returns
True if this material has a reflection

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Reflectivity()

virtual double Reflectivity ( ) const
pure virtual

Get the reflectivity value.

Returns
The reflectivity value

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ 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 >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ 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 >, OgreMaterial, and BaseMaterial< OgreObject >.

◆ 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 OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ 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 >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ 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< OgreObject >, and OgreMaterial.

◆ 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 >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ 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< OgreObject >, and OgreMaterial.

◆ 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 OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ SetNormalMap()

virtual void SetNormalMap ( const std::string _name)
pure virtual

Set the material normal map.

Parameters
[in]_nameURI of the new normal map file

Implemented in OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), and Material::~Material().

◆ 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 OgreMaterial, BaseMaterial< T >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ 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 OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ SetReflectivity()

virtual void SetReflectivity ( const double  _reflectivity)
pure virtual

Set the reflectivity value.

Parameters
[in]_reflectivityNew reflectivity value

Implemented in OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ SetShaderType()

virtual void SetShaderType ( enum ShaderType  _type)
pure virtual

Set the ShaderType value.

Parameters
[in]_typeNew ShaderType value

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

Referenced by Material::~Material().

◆ SetShininess()

virtual void SetShininess ( const double  _shininess)
pure virtual

Set the shininess value.

Parameters
[in]_shininessNew shininess value

Implemented in OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ 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 >, and BaseMaterial< OgreObject >.

Referenced by Material::~Material().

◆ 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< OgreObject >, and OgreMaterial.

◆ SetTexture()

virtual void SetTexture ( const std::string _name)
pure virtual

Set the material texture.

Parameters
[in]_nameURI of the new texture file

Implemented in OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), and Material::~Material().

◆ SetTransparency()

virtual void SetTransparency ( const double  _transparency)
pure virtual

Set the transparency value.

Parameters
[in]_transparencyNew transparency value

Implemented in OgreMaterial.

Referenced by BaseMaterial< OgreObject >::CopyFrom(), BaseMaterial< OgreObject >::Reset(), and Material::~Material().

◆ ShaderType()

virtual enum ShaderType ShaderType ( ) const
pure virtual

Get the ShaderType value.

Returns
The ShaderType value

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Shininess()

virtual double Shininess ( ) const
pure virtual

Get the shininess value.

Returns
The shininess value

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Specular()

virtual math::Color Specular ( ) const
pure virtual

Get the specular color.

Returns
The specular color

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Texture()

virtual std::string Texture ( ) const
pure virtual

Get the URI of the texture file.

Returns
URI of the texture file

Implemented in OgreMaterial.

Referenced by Material::~Material().

◆ Transparency()

virtual double Transparency ( ) const
pure virtual

Get the transparency value.

Returns
The transparency value

Implemented in OgreMaterial.

Referenced by Material::~Material().


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