17 #ifndef IGNITION_COMMON_MATERIAL_HH_ 18 #define IGNITION_COMMON_MATERIAL_HH_ 25 #include <ignition/common/graphics/Export.hh> 29 #include <ignition/utils/ImplPtr.hh> 36 class IGNITION_COMMON_GRAPHICS_VISIBLE
Material 106 public:
void SetTextureImage(
const std::string &_tex);
111 public:
void SetTextureImage(
const std::string &_tex,
154 public:
void SetTransparency(
double _t);
159 public:
double Transparency()
const;
165 public:
void SetAlphaFromTexture(
bool _enabled,
166 double _alpha = 0.5,
bool _twoSided =
true);
170 public:
bool TextureAlphaEnabled()
const;
174 public:
double AlphaThreshold()
const;
178 public:
bool TwoSidedEnabled()
const;
183 public:
void SetRenderOrder(
float _renderOrder);
187 public:
float RenderOrder()
const;
191 public:
void SetShininess(
double _t);
195 public:
double Shininess()
const;
201 public:
void SetBlendFactors(
double _srcFactor,
double _dstFactor);
206 public:
void BlendFactors(
double &_srcFactor,
double &_dstFactor)
const;
232 public:
void SetPointSize(
double _size);
236 public:
double PointSize()
const;
240 public:
void SetDepthWrite(
bool _value);
244 public:
bool DepthWrite()
const;
248 public:
void SetLighting(
bool _value);
252 public:
bool Lighting()
const;
256 public:
void SetPbrMaterial(
const Pbr &_pbr);
260 public:
Pbr *PbrMaterial()
const;
268 _out <<
"Material:\n";
269 _out <<
" Name: " << _m.
Name() <<
"\n";
271 _out <<
" Ambient: " << _m.
Ambient() <<
"\n";
272 _out <<
" Diffuse: " << _m.
Diffuse() <<
"\n";
273 _out <<
" Specular: " << _m.
Specular() <<
"\n";
274 _out <<
" Emissive: " << _m.
Emissive() <<
"\n";
276 _out <<
" Shininess: " << _m.
Shininess() <<
"\n";
277 _out <<
" Render order: " << _m.
RenderOrder() <<
"\n";
278 _out <<
" BlendMode: " << _m.
BlendStr() <<
"\n";
279 _out <<
" ShadeMode: " << _m.
ShadeStr() <<
"\n";
280 _out <<
" DepthWrite: " << _m.
DepthWrite() <<
"\n";
285 IGN_UTILS_UNIQUE_IMPL_PTR(dataPtr)
friend std::ostream & operator<<(std::ostream &_out, const Material &_m)
Stream insertion operator param[in] _out the output stream to extract from param[out] _m the material...
Definition: Material.hh:265
BlendMode
Definition: Material.hh:67
std::string Name() const
Get the name of the material.
double Transparency() const
Get the transparency percentage (0..1) A value of 1 is fully transparent and 0 is not transparent...
double Shininess() const
Get the shininess.
Encapsulates description of a material.
Definition: Material.hh:36
std::string ShadeStr() const
Get the shade mode string.
This class contains Physically-Based-Rendering (PBR) workflow properties.
Definition: Pbr.hh:55
std::string BlendStr() const
Get the blend mode string.
std::string TextureImage() const
Get a texture image.
bool DepthWrite() const
Get depth write.
math::Color Ambient() const
Get the ambient color.
ShadeMode
Definition: Material.hh:40
Forward declarations for the common classes.
math::Color Specular() const
Get the specular color.
math::Color Diffuse() const
Get the diffuse color.
float RenderOrder() const
Get the render order.
math::Color Emissive() const
Get the emissive color.