- gazebo
- common
- Material
Encapsulates a description of a material. More...
#include <Material.hh>
Public Types | |
| enum | ShadeMode { FLAT, GOURAUD, PHONG, BLINN, SHADE_COUNT } |
| enum | BlendMode { ADD, MODULATE, REPLACE, BLEND_COUNT } |
Public Member Functions | |
| Material () | |
| Constructor. | |
| virtual | ~Material () |
| Destructor. | |
| Material (const Color &clr) | |
| Create a material with a default color. | |
| std::string | GetName () const |
| Get the name of the material. | |
| void | SetTextureImage (const std::string &tex) |
| Set a texture image. | |
| void | SetTextureImage (const std::string &tex, const std::string &resource_path) |
| Set a texture image. | |
| std::string | GetTextureImage () const |
| Get a thie texture image. | |
| void | SetAmbient (const Color &clr) |
| Set the ambient color. | |
| Color | GetAmbient () const |
| Get the ambient color. | |
| void | SetDiffuse (const Color &clr) |
| Set the diffuse color. | |
| Color | GetDiffuse () const |
| Get the diffuse color. | |
| void | SetSpecular (const Color &clr) |
| Set the specular color. | |
| Color | GetSpecular () const |
| Get the specular color. | |
| void | SetEmissive (const Color &clr) |
| Set the emissive color. | |
| Color | GetEmissive () const |
| Get the emissive color. | |
| void | SetTransparency (float t) |
| Set the transparency percentage (0..1) | |
| float | SetTransparency () const |
| Get the transparency percentage (0..1) | |
| void | SetShininess (float t) |
| Set the shininess. | |
| float | GetShininess () const |
| Get the shininess. | |
| float | GetTransparency () const |
| Get the shininess. | |
| void | SetBlendFactors (double _srcFactor, double _dstFactor) |
| Set the blende factors. | |
| void | GetBlendFactors (double &_srcFactor, double &_dstFactor) |
| Get the blend factors. | |
| void | SetBlendMode (BlendMode b) |
| Set the blending mode. | |
| BlendMode | GetBlendMode () const |
| Get the blending mode. | |
| void | SetShadeMode (ShadeMode b) |
| Set the shading mode. | |
| ShadeMode | GetShadeMode () const |
| Get the shading mode. | |
| void | SetPointSize (double size) |
| Set the point size. | |
| double | GetPointSize () const |
| Get the point size. | |
| void | SetDepthWrite (bool _value) |
| Set depth write. | |
| bool | GetDepthWrite () const |
| Get depth write. | |
| void | SetLighting (bool _value) |
| Set lighting enabled. | |
| bool | GetLighting () const |
| Get lighting enabled. | |
Static Public Attributes | |
| static std::string | ShadeModeStr [SHADE_COUNT] |
| static std::string | BlendModeStr [BLEND_COUNT] |
Protected Attributes | |
| std::string | name |
| std::string | texImage |
| Color | ambient |
| Color | diffuse |
| Color | specular |
| Color | emissive |
| float | transparency |
| float | shininess |
| double | pointSize |
| BlendMode | blendMode |
| ShadeMode | shadeMode |
Friends | |
| std::ostream & | operator<< (std::ostream &out, const gazebo::common::Material &m) |
| Ostream operator. | |
Encapsulates a description of a material.
| void SetBlendFactors | ( | double | _srcFactor, |
| double | _dstFactor | ||
| ) |
Set the blende factors.
Will be interpreted as: (texture * _srcFactor) + (scene_pixel * _dstFactor)
1.7.5.1