17 #ifndef IGNITION_COMMON_MATERIAL_HH_ 18 #define IGNITION_COMMON_MATERIAL_HH_ 25 #include <ignition/common/graphics/Export.hh> 35 class MaterialPrivate;
38 class IGNITION_COMMON_GRAPHICS_VISIBLE
Material 108 public:
void SetTextureImage(
const std::string &_tex);
113 public:
void SetTextureImage(
const std::string &_tex,
155 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;
182 public:
void SetShininess(
double _t);
186 public:
double Shininess()
const;
192 public:
void SetBlendFactors(
double _srcFactor,
double _dstFactor);
197 public:
void BlendFactors(
double &_srcFactor,
double &_dstFactor)
const;
223 public:
void SetPointSize(
double _size);
227 public:
double PointSize()
const;
231 public:
void SetDepthWrite(
bool _value);
235 public:
bool DepthWrite()
const;
239 public:
void SetLighting(
bool _value);
243 public:
bool Lighting()
const;
247 public:
void SetPbrMaterial(
const Pbr &_pbr);
251 public:
Pbr *PbrMaterial()
const;
259 _out <<
"Material:\n";
260 _out <<
" Name: " << _m.
Name() <<
"\n";
262 _out <<
" Ambient: " << _m.
Ambient() <<
"\n";
263 _out <<
" Diffuse: " << _m.
Diffuse() <<
"\n";
264 _out <<
" Specular: " << _m.
Specular() <<
"\n";
265 _out <<
" Emissive: " << _m.
Emissive() <<
"\n";
267 _out <<
" Shininess: " << _m.
Shininess() <<
"\n";
268 _out <<
" BlendMode: " << _m.
BlendStr() <<
"\n";
269 _out <<
" ShadeMode: " << _m.
ShadeStr() <<
"\n";
270 _out <<
" DepthWrite: " << _m.
DepthWrite() <<
"\n";
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:256
BlendMode
Definition: Material.hh:69
std::string Name() const
Get the name of the material.
double Transparency() const
Get the transparency percentage (0..1)
#define IGN_COMMON_WARN_RESUME__DLL_INTERFACE_MISSING
Definition: SuppressWarning.hh:67
double Shininess() const
Get the shininess.
Encapsulates description of a material.
Definition: Material.hh:38
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:42
Forward declarations for the common classes.
math::Color Specular() const
Get the specular color.
math::Color Diffuse() const
Get the diffuse color.
math::Color Emissive() const
Get the emissive color.
#define IGN_COMMON_WARN_IGNORE__DLL_INTERFACE_MISSING
Microsoft Visual Studio does not automatically export the interface information for member variables ...
Definition: SuppressWarning.hh:64