Encapsulates description of a material.
More...
#include <common/common.hh>
|
| Material () |
| Constructor.
|
|
| Material (const ignition::math::Color &_clr) |
| Create a material with a default color.
|
|
virtual | ~Material () |
| Destructor.
|
|
ignition::math::Color | Ambient () const |
| Get the ambient color.
|
|
ignition::math::Color | Diffuse () const |
| Get the diffuse color.
|
|
ignition::math::Color | Emissive () const |
| Get the emissive color.
|
|
void | GetBlendFactors (double &_srcFactor, double &_dstFactor) const |
| Get the blend factors.
|
|
BlendMode | GetBlendMode () const |
| Get the blending mode.
|
|
bool | GetDepthWrite () const |
| Get depth write.
|
|
bool | GetLighting () const |
| Get lighting enabled.
|
|
std::string | GetName () const |
| Get the name of the material.
|
|
double | GetPointSize () const |
| Get the point size.
|
|
ShadeMode | GetShadeMode () const |
| Get the shading mode.
|
|
double | GetShininess () const |
| Get the shininess.
|
|
std::string | GetTextureImage () const |
| Get a texture image.
|
|
double | GetTransparency () const |
| Get the transparency percentage (0..1)
|
|
void | SetAmbient (const ignition::math::Color &_clr) |
| Set the ambient color.
|
|
void | SetBlendFactors (double _srcFactor, double _dstFactor) |
| Set the blende factors.
|
|
void | SetBlendMode (BlendMode _b) |
| Set the blending mode.
|
|
void | SetDepthWrite (bool _value) |
| Set depth write.
|
|
void | SetDiffuse (const ignition::math::Color &_clr) |
| Set the diffuse color.
|
|
void | SetEmissive (const ignition::math::Color &_clr) |
| Set the emissive color.
|
|
void | SetLighting (bool _value) |
| Set lighting enabled.
|
|
void | SetPointSize (double _size) |
| Set the point size.
|
|
void | SetShadeMode (ShadeMode _b) |
| Set the shading mode param[in] the shading mode.
|
|
void | SetShininess (double _t) |
| Set the shininess.
|
|
void | SetSpecular (const ignition::math::Color &_clr) |
| Set the specular color.
|
|
void | SetTextureImage (const std::string &_tex) |
| Set a texture image.
|
|
void | SetTextureImage (const std::string &_tex, const std::string &_resourcePath) |
| Set a texture image.
|
|
void | SetTransparency (double _t) |
| Set the transparency percentage (0..1)
|
|
ignition::math::Color | Specular () const |
| Get the specular color.
|
|
Encapsulates description of a material.
◆ BlendMode
Enumerator |
---|
ADD | |
MODULATE | |
REPLACE | |
BLEND_COUNT | |
◆ ShadeMode
Enumerator |
---|
FLAT | |
GOURAUD | |
PHONG | |
BLINN | |
SHADE_COUNT | |
◆ Material() [1/2]
◆ ~Material()
◆ Material() [2/2]
Material |
( |
const ignition::math::Color & | _clr | ) |
|
|
explicit |
Create a material with a default color.
- Parameters
-
[in] | _clr | Color of the material |
◆ Ambient()
ignition::math::Color Ambient |
( |
| ) |
const |
Get the ambient color.
- Returns
- The ambient color
◆ Diffuse()
ignition::math::Color Diffuse |
( |
| ) |
const |
Get the diffuse color.
- Returns
- The diffuse color
◆ Emissive()
ignition::math::Color Emissive |
( |
| ) |
const |
Get the emissive color.
- Returns
- The emissive color
◆ GetBlendFactors()
void GetBlendFactors |
( |
double & | _srcFactor, |
|
|
double & | _dstFactor ) const |
Get the blend factors.
- Parameters
-
[in] | _srcFactor | Source factor is returned in this variable |
[in] | _dstFactor | Destination factor is returned in this variable |
◆ GetBlendMode()
Get the blending mode.
- Returns
- the blend mode
◆ GetDepthWrite()
bool GetDepthWrite |
( |
| ) |
const |
Get depth write.
- Returns
- the depth write enabled state
◆ GetLighting()
bool GetLighting |
( |
| ) |
const |
Get lighting enabled.
- Returns
- the lighting enabled state
◆ GetName()
std::string GetName |
( |
| ) |
const |
Get the name of the material.
- Returns
- The name of the material
◆ GetPointSize()
double GetPointSize |
( |
| ) |
const |
Get the point size.
- Returns
- the point size
◆ GetShadeMode()
Get the shading mode.
- Returns
- the shading mode
◆ GetShininess()
double GetShininess |
( |
| ) |
const |
Get the shininess.
- Returns
- The shininess value
◆ GetTextureImage()
std::string GetTextureImage |
( |
| ) |
const |
Get a texture image.
- Returns
- The name of the texture image (if one exists) or an empty string
◆ GetTransparency()
double GetTransparency |
( |
| ) |
const |
Get the transparency percentage (0..1)
- Returns
- The transparency percentage
◆ SetAmbient()
void SetAmbient |
( |
const ignition::math::Color & | _clr | ) |
|
Set the ambient color.
- Parameters
-
[in] | _clr | The ambient color |
◆ SetBlendFactors()
void SetBlendFactors |
( |
double | _srcFactor, |
|
|
double | _dstFactor ) |
Set the blende factors.
Will be interpreted as: (texture * _srcFactor) + (scene_pixel * _dstFactor)
- Parameters
-
[in] | _srcFactor | The source factor |
[in] | _dstFactor | The destination factor |
◆ SetBlendMode()
Set the blending mode.
- Parameters
-
◆ SetDepthWrite()
void SetDepthWrite |
( |
bool | _value | ) |
|
Set depth write.
- Parameters
-
[in] | _value | the depth write enabled state |
◆ SetDiffuse()
void SetDiffuse |
( |
const ignition::math::Color & | _clr | ) |
|
Set the diffuse color.
- Parameters
-
[in] | _clr | The diffuse color |
◆ SetEmissive()
void SetEmissive |
( |
const ignition::math::Color & | _clr | ) |
|
Set the emissive color.
- Parameters
-
[in] | _clr | The emissive color |
◆ SetLighting()
void SetLighting |
( |
bool | _value | ) |
|
Set lighting enabled.
- Parameters
-
[in] | _value | the lighting enabled state |
◆ SetPointSize()
void SetPointSize |
( |
double | _size | ) |
|
Set the point size.
- Parameters
-
◆ SetShadeMode()
Set the shading mode param[in] the shading mode.
◆ SetShininess()
void SetShininess |
( |
double | _t | ) |
|
Set the shininess.
- Parameters
-
[in] | _t | The shininess value |
◆ SetSpecular()
void SetSpecular |
( |
const ignition::math::Color & | _clr | ) |
|
Set the specular color.
- Parameters
-
[in] | _clr | The specular color |
◆ SetTextureImage() [1/2]
void SetTextureImage |
( |
const std::string & | _tex | ) |
|
Set a texture image.
- Parameters
-
[in] | _tex | The name of the texture, which must be in Gazebo's resource path |
◆ SetTextureImage() [2/2]
void SetTextureImage |
( |
const std::string & | _tex, |
|
|
const std::string & | _resourcePath ) |
Set a texture image.
- Parameters
-
[in] | _tex | The name of the texture |
[in] | _resourcePath | Path which contains _tex |
◆ SetTransparency()
void SetTransparency |
( |
double | _t | ) |
|
Set the transparency percentage (0..1)
- Parameters
-
[in] | _t | The amount of transparency (0..1) |
◆ Specular()
ignition::math::Color Specular |
( |
| ) |
const |
Get the specular color.
- Returns
- The specular color
◆ ambient
ignition::math::Color ambient |
|
protected |
◆ blendMode
◆ BlendModeStr
◆ diffuse
ignition::math::Color diffuse |
|
protected |
◆ emissive
ignition::math::Color emissive |
|
protected |
◆ name
◆ pointSize
◆ shadeMode
◆ ShadeModeStr
◆ shininess
◆ specular
ignition::math::Color specular |
|
protected |
◆ texImage
the texture image file name
◆ transparency
double transparency = 0.0 |
|
protected |
transparency value in the range 0 to 1
The documentation for this class was generated from the following file: