Go to the documentation of this file.
17 #ifndef SDF_MATERIAL_HH_
18 #define SDF_MATERIAL_HH_
23 #include "sdf/sdf_config.h"
29 inline namespace SDF_VERSION_NAMESPACE {
33 class MaterialPrivate;
83 public: ignition::math::Color
Ambient()
const;
89 public:
void SetAmbient(
const ignition::math::Color &_color)
const;
95 public: ignition::math::Color
Diffuse()
const;
101 public:
void SetDiffuse(
const ignition::math::Color &_color)
const;
113 public:
void SetSpecular(
const ignition::math::Color &_color)
const;
125 public:
void SetEmissive(
const ignition::math::Color &_color)
const;
198 private: MaterialPrivate *dataPtr =
nullptr;
std::string ScriptUri() const
Get the URI of the material script, if one has been set.
@ NORMAL_MAP_TANGENTSPACE
void SetScriptName(const std::string &_name)
Set the name of the material script.
void SetLighting(const bool _lighting)
Set whether dynamic lighting is enabled.
ignition::math::Color Emissive() const
Get the emissive color.
namespace for Simulation Description Format parser
Definition: Actor.hh:33
void SetAmbient(const ignition::math::Color &_color) const
Set the ambient color.
Material(Material &&_material) noexcept
Move constructor.
void SetShader(const ShaderType &_type)
Set the type of shader.
This class contains visual material properties.
Definition: Material.hh:46
Pbr * PbrMaterial() const
Get the Physically Based Rendering (PBR) material.
void SetPbrMaterial(const Pbr &_pbr)
Set the Physically Based Rendering (PBR) material.
Material()
Default constructor.
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:89
void SetSpecular(const ignition::math::Color &_color) const
Set the specular color.
#define SDFORMAT_VISIBLE
Definition: system_util.hh:48
Material(const Material &_material)
Copy constructor.
ignition::math::Color Ambient() const
Get the ambient color.
std::string ScriptName() const
Get the name of the material script, or empty if one has not been specified.
void SetEmissive(const ignition::math::Color &_color) const
Set the emissive color.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
ShaderType
Definition: Material.hh:37
Material & operator=(Material &&_material)
Move assignment operator.
This class provides access to Physically-Based-Rendering (PBR) material workflows.
Definition: Pbr.hh:247
Errors Load(ElementPtr _sdf)
Load the material based on a element pointer.
void SetScriptUri(const std::string &_uri)
Set the URI of the material script.
bool Lighting() const
Get whether dynamic lighting is enabled.
ignition::math::Color Diffuse() const
Get the diffuse color.
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:53
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
void SetDiffuse(const ignition::math::Color &_color) const
Set the diffuse color.
ignition::math::Color Specular() const
Get the specular color.
std::string NormalMap() const
Get the normal map filename.
const std::string & FilePath() const
The path to the file where this element was loaded from.
ShaderType Shader() const
Get the type of shader.
void SetNormalMap(const std::string &_map)
Set the normal map filename.
Material & operator=(const Material &_material)
Assignment operator.