Encapsulates description of a material.
More...
#include <common/common.hh>
|
std::ostream & | operator<< (std::ostream &_out, const gazebo::common::Material &_m) |
| Stream insertion operator param[in] _out the output stream to extract from param[out] _m the material information.
|
|
Encapsulates description of a material.
- Enumerator:
ADD |
|
MODULATE |
|
REPLACE |
|
BLEND_COUNT |
|
- Enumerator:
FLAT |
|
GOURAUD |
|
PHONG |
|
BLINN |
|
SHADE_COUNT |
|
gazebo::common::Material::Material |
( |
| ) |
|
virtual gazebo::common::Material::~Material |
( |
| ) |
|
|
virtual |
gazebo::common::Material::Material |
( |
const Color & |
_clr | ) |
|
Create a material with a default color.
- Parameters
-
[in] | _clr | Color of the material |
Color gazebo::common::Material::GetAmbient |
( |
| ) |
const |
Get the ambient color.
- Returns
- The ambient color
void gazebo::common::Material::GetBlendFactors |
( |
double & |
_srcFactor, |
|
|
double & |
_dstFactor |
|
) |
| |
Get the blend factors.
- Parameters
-
[in] | _srcFactor | Source factor is returned in this variable |
[in] | _dstFactor | Destination factor is returned in this variable |
BlendMode gazebo::common::Material::GetBlendMode |
( |
| ) |
const |
Get the blending mode.
- Returns
- the blend mode
bool gazebo::common::Material::GetDepthWrite |
( |
| ) |
const |
Get depth write.
- Returns
- the depth write enabled state
Color gazebo::common::Material::GetDiffuse |
( |
| ) |
const |
Get the diffuse color.
- Returns
- The diffuse color
Color gazebo::common::Material::GetEmissive |
( |
| ) |
const |
Get the emissive color.
- Returns
- The emissive color
bool gazebo::common::Material::GetLighting |
( |
| ) |
const |
Get lighting enabled.
- Returns
- the lighting enabled state
std::string gazebo::common::Material::GetName |
( |
| ) |
const |
Get the name of the material.
- Returns
- The name of the material
double gazebo::common::Material::GetPointSize |
( |
| ) |
const |
Get the point size.
- Returns
- the point size
ShadeMode gazebo::common::Material::GetShadeMode |
( |
| ) |
const |
Get the shading mode.
- Returns
- the shading mode
double gazebo::common::Material::GetShininess |
( |
| ) |
const |
Get the shininess.
- Returns
- The shininess value
Color gazebo::common::Material::GetSpecular |
( |
| ) |
const |
Get the specular color.
- Returns
- The specular color
std::string gazebo::common::Material::GetTextureImage |
( |
| ) |
const |
Get a texture image.
- Returns
- The name of the texture image (if one exists) or an empty string
double gazebo::common::Material::GetTransparency |
( |
| ) |
const |
Get the transparency percentage (0..1)
- Returns
- The transparency percentage
void gazebo::common::Material::SetAmbient |
( |
const Color & |
_clr | ) |
|
Set the ambient color.
- Parameters
-
[in] | _clr | The ambient color |
void gazebo::common::Material::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 |
void gazebo::common::Material::SetBlendMode |
( |
BlendMode |
_b | ) |
|
Set the blending mode.
- Parameters
-
void gazebo::common::Material::SetDepthWrite |
( |
bool |
_value | ) |
|
Set depth write.
- Parameters
-
[in] | _value | the depth write enabled state |
void gazebo::common::Material::SetDiffuse |
( |
const Color & |
_clr | ) |
|
Set the diffuse color.
- Parameters
-
[in] | _clr | The diffuse color |
void gazebo::common::Material::SetEmissive |
( |
const Color & |
_clr | ) |
|
Set the emissive color.
- Parameters
-
[in] | _clr | The emissive color |
void gazebo::common::Material::SetLighting |
( |
bool |
_value | ) |
|
Set lighting enabled.
- Parameters
-
[in] | _value | the lighting enabled state |
void gazebo::common::Material::SetPointSize |
( |
double |
_size | ) |
|
Set the point size.
- Parameters
-
void gazebo::common::Material::SetShadeMode |
( |
ShadeMode |
_b | ) |
|
Set the shading mode param[in] the shading mode.
void gazebo::common::Material::SetShininess |
( |
double |
_t | ) |
|
Set the shininess.
- Parameters
-
[in] | _t | The shininess value |
void gazebo::common::Material::SetSpecular |
( |
const Color & |
_clr | ) |
|
Set the specular color.
- Parameters
-
[in] | _clr | The specular color |
void gazebo::common::Material::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 |
void gazebo::common::Material::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 |
void gazebo::common::Material::SetTransparency |
( |
double |
_t | ) |
|
Set the transparency percentage (0..1)
- Parameters
-
[in] | _t | The amount of transparency (0..1) |
Stream insertion operator param[in] _out the output stream to extract from param[out] _m the material information.
Color gazebo::common::Material::ambient |
|
protected |
BlendMode gazebo::common::Material::blendMode |
|
protected |
std::string gazebo::common::Material::BlendModeStr[BLEND_COUNT] |
|
static |
Color gazebo::common::Material::diffuse |
|
protected |
Color gazebo::common::Material::emissive |
|
protected |
std::string gazebo::common::Material::name |
|
protected |
double gazebo::common::Material::pointSize |
|
protected |
ShadeMode gazebo::common::Material::shadeMode |
|
protected |
std::string gazebo::common::Material::ShadeModeStr[SHADE_COUNT] |
|
static |
double gazebo::common::Material::shininess |
|
protected |
Color gazebo::common::Material::specular |
|
protected |
std::string gazebo::common::Material::texImage |
|
protected |
the texture image file name
double gazebo::common::Material::transparency |
|
protected |
transparency value in the range 0 to 1
The documentation for this class was generated from the following file: