17 #ifndef SDF_MATERIAL_HH_
18 #define SDF_MATERIAL_HH_
21 #include <gz/utils/ImplPtr.hh>
30 inline namespace SDF_VERSION_NAMESPACE {
230 GZ_UTILS_IMPL_PTR(dataPtr)
This class contains visual material properties.
Definition: Material.hh:47
double Shininess() const
Get the specular exponent.
gz::math::Color Emissive() const
Get the emissive color.
std::string ScriptUri() const
Get the URI of the material script, if one has been set.
gz::math::Color Diffuse() const
Get the diffuse color.
std::string ScriptName() const
Get the name of the material script, or empty if one has not been specified.
void SetRenderOrder(const float _renderOrder)
Set render order.
gz::math::Color Ambient() const
Get the ambient color.
Errors Load(sdf::ElementPtr _sdf, const ParserConfig &_config)
Load the material based on a element pointer.
void SetFilePath(const std::string &_filePath)
Set the path to the file where this element was loaded from.
void SetNormalMap(const std::string &_map)
Set the normal map filename.
bool DoubleSided() const
Get whether double sided material is enabled.
void SetEmissive(const gz::math::Color &_color)
Set the emissive color.
void SetScriptName(const std::string &_name)
Set the name of the material script.
void SetAmbient(const gz::math::Color &_color)
Set the ambient color.
void SetScriptUri(const std::string &_uri)
Set the URI of the material script.
Errors Load(ElementPtr _sdf)
Load the material based on a element pointer.
sdf::ElementPtr ToElement() const
Create and return an SDF element filled with data from this material.
void SetPbrMaterial(const Pbr &_pbr)
Set the Physically Based Rendering (PBR) material.
void SetDiffuse(const gz::math::Color &_color)
Set the diffuse color.
sdf::ElementPtr Element() const
Get a pointer to the SDF element that was used during load.
gz::math::Color Specular() const
Get the specular color.
void SetDoubleSided(bool _doubleSided)
Set whether double sided material is enabled.
const std::string & FilePath() const
The path to the file where this element was loaded from.
bool Lighting() const
Get whether dynamic lighting is enabled.
void SetSpecular(const gz::math::Color &_color)
Set the specular color.
std::string NormalMap() const
Get the normal map filename.
const Pbr * PbrMaterial() const
Get the Physically Based Rendering (PBR) material.
sdf::ElementPtr ToElement(sdf::Errors &_errors) const
Create and return an SDF element filled with data from this material.
void SetLighting(const bool _lighting)
Set whether dynamic lighting is enabled.
Material()
Default constructor.
ShaderType Shader() const
Get the type of shader.
void SetShader(const ShaderType &_type)
Set the type of shader.
float RenderOrder() const
Get render order for coplanar polygons.
void SetShininess(const double _shininess)
Set the specular exponent.
This class contains configuration options for the libsdformat parser.
Definition: ParserConfig.hh:100
This class provides access to Physically-Based-Rendering (PBR) material workflows.
Definition: Pbr.hh:239
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:95
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:55
ShaderType
Definition: Material.hh:38
@ NORMAL_MAP_TANGENTSPACE
namespace for Simulation Description Format parser
Definition: Actor.hh:35
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:25