Go to the documentation of this file.
17 #ifndef GZ_RENDERING_OGRE2_OGRE2MATERIAL_HH_
18 #define GZ_RENDERING_OGRE2_OGRE2MATERIAL_HH_
30 inline namespace IGNITION_RENDERING_VERSION_NAMESPACE {
43 public:
virtual void Destroy()
override;
46 public:
virtual math::Color Diffuse()
const override;
49 public:
virtual void SetDiffuse(
const math::Color &_color)
override;
52 public:
virtual math::Color Specular()
const override;
55 public:
virtual void SetSpecular(
const math::Color &_color)
override;
58 public:
virtual math::Color Emissive()
const override;
61 public:
virtual void SetEmissive(
const math::Color &_color)
override;
64 public:
virtual void SetTransparency(
const double _transparency)
override;
67 public:
virtual bool ReceiveShadows()
const override;
70 public:
virtual void SetReceiveShadows(
const bool _receiveShadows)
74 public:
virtual bool HasTexture()
const override;
77 public:
virtual std::string Texture()
const override;
80 public:
virtual void SetTexture(
const std::string &_texture)
override;
83 public:
virtual void ClearTexture()
override;
86 public:
virtual bool HasNormalMap()
const override;
89 public:
virtual std::string NormalMap()
const override;
92 public:
virtual void SetNormalMap(
const std::string &_normalMap)
override;
95 public:
virtual void ClearNormalMap()
override;
98 public:
virtual bool HasRoughnessMap()
const override;
101 public:
virtual std::string RoughnessMap()
const override;
104 public:
virtual void SetRoughnessMap(
108 public:
virtual void ClearRoughnessMap()
override;
111 public:
virtual bool HasMetalnessMap()
const override;
114 public:
virtual std::string MetalnessMap()
const override;
117 public:
virtual void SetMetalnessMap(
121 public:
virtual void ClearMetalnessMap()
override;
124 public:
virtual bool HasEnvironmentMap()
const override;
127 public:
virtual std::string EnvironmentMap()
const override;
130 public:
virtual void SetEnvironmentMap(
134 public:
virtual void ClearEnvironmentMap()
override;
137 public:
virtual void SetRoughness(
const float _roughness)
override;
140 public:
virtual bool HasEmissiveMap()
const override;
143 public:
virtual std::string EmissiveMap()
const override;
146 public:
virtual void SetEmissiveMap(
150 public:
virtual void ClearEmissiveMap()
override;
153 public:
virtual float Roughness()
const override;
156 public:
virtual void SetMetalness(
const float _roughness)
override;
159 public:
virtual float Metalness()
const override;
163 public:
virtual Ogre::MaterialPtr
Material();
167 public:
virtual Ogre::HlmsPbsDatablock *Datablock()
const;
171 public:
virtual void PreRender()
override;
174 public:
virtual enum MaterialType Type()
const override;
177 public:
virtual bool DepthCheckEnabled()
const override;
180 public:
virtual void SetDepthCheckEnabled(
bool _enabled)
override;
183 public:
virtual bool DepthWriteEnabled()
const override;
186 public:
virtual void SetDepthWriteEnabled(
bool _enabled)
override;
192 protected:
virtual void SetTextureMapImpl(
const std::string &_texture,
193 Ogre::PbsTextureTypes _type);
197 protected:
virtual Ogre::TexturePtr Texture(
const std::string &_name);
201 protected:
virtual void UpdateTransparency();
204 protected:
virtual void Init()
override;
210 protected: Ogre::HlmsPbsDatablock *ogreDatablock =
nullptr;
213 protected: Ogre::HlmsPbs *ogreHlmsPbs =
nullptr;
MaterialType
An enum for the type of material.
Definition: gz/rendering/Material.hh:36
std::string environmentMapName
Name of the environment map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:228
std::string metalnessMapName
Name of the metalness map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:225
std::string emissiveMapName
Name of the emissive map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:231
std::string normalMapName
Name of the normal map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:219
Definition: gz/rendering/base/BaseMaterial.hh:38
std::string textureName
Name of the texture.
Definition: gz/rendering/ogre2/Ogre2Material.hh:216
std::string roughnessMapName
Name of the roughness map.
Definition: gz/rendering/ogre2/Ogre2Material.hh:222
Ogre2.x implementation of the scene class.
Definition: gz/rendering/ogre2/Ogre2Scene.hh:41
Ogre 2.x implementation of the material class.
Definition: gz/rendering/ogre2/Ogre2Material.hh:33
std::string ogreDatablockId
Unique id assigned to ogre hlms datablock.
Definition: gz/rendering/ogre2/Ogre2Material.hh:234
Represents a surface material of a Geometry.
Definition: gz/rendering/Material.hh:47
Ogre::MaterialPtr ogreMaterial
Ogre material. Mainly used for render targets.
Definition: gz/rendering/ogre2/Ogre2Material.hh:207