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,
156 public:
void SetTransparency(
double _t);
161 public:
double Transparency()
const;
167 public:
void SetAlphaFromTexture(
bool _enabled,
168 double _alpha = 0.5,
bool _twoSided =
true);
172 public:
bool TextureAlphaEnabled()
const;
176 public:
double AlphaThreshold()
const;
180 public:
bool TwoSidedEnabled()
const;
185 public:
void SetRenderOrder(
float _renderOrder);
189 public:
float RenderOrder()
const;
193 public:
void SetShininess(
double _t);
197 public:
double Shininess()
const;
203 public:
void SetBlendFactors(
double _srcFactor,
double _dstFactor);
208 public:
void BlendFactors(
double &_srcFactor,
double &_dstFactor)
const;
234 public:
void SetPointSize(
double _size);
238 public:
double PointSize()
const;
242 public:
void SetDepthWrite(
bool _value);
246 public:
bool DepthWrite()
const;
250 public:
void SetLighting(
bool _value);
254 public:
bool Lighting()
const;
258 public:
void SetPbrMaterial(
const Pbr &_pbr);
262 public:
Pbr *PbrMaterial()
const;
270 _out <<
"Material:\n";
271 _out <<
" Name: " << _m.
Name() <<
"\n";
273 _out <<
" Ambient: " << _m.
Ambient() <<
"\n";
274 _out <<
" Diffuse: " << _m.
Diffuse() <<
"\n";
275 _out <<
" Specular: " << _m.
Specular() <<
"\n";
276 _out <<
" Emissive: " << _m.
Emissive() <<
"\n";
278 _out <<
" Shininess: " << _m.
Shininess() <<
"\n";
279 _out <<
" Render order: " << _m.
RenderOrder() <<
"\n";
280 _out <<
" BlendMode: " << _m.
BlendStr() <<
"\n";
281 _out <<
" ShadeMode: " << _m.
ShadeStr() <<
"\n";
282 _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:267
BlendMode
Definition: Material.hh:69
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...
#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.
float RenderOrder() const
Get the render order.
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