#include <OgreMaterial.hh>
Public Member Functions | |
virtual | ~OgreMaterial () |
virtual math::Color | Ambient () const override |
Get the ambient color. More... | |
virtual bool | CastShadows () const override |
Determine if this material casts shadows. More... | |
virtual void | ClearNormalMap () override |
Removes any normal map mapped to this material. More... | |
virtual void | ClearTexture () override |
Removes any texture mapped to this material. More... | |
virtual bool | DepthCheckEnabled () const override |
Determine if depth buffer checking is enabled. More... | |
virtual bool | DepthWriteEnabled () const override |
Determine if depth buffer writing is enabled. More... | |
virtual void | Destroy () override |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More... | |
virtual math::Color | Diffuse () const override |
Get the diffuse color. More... | |
virtual math::Color | Emissive () const override |
Get the emissive color. More... | |
virtual std::string | FragmentShader () const override |
Get path to the fragment shader. More... | |
virtual ShaderParamsPtr | FragmentShaderParams () override |
Get params for the fragment shader. More... | |
virtual bool | HasNormalMap () const override |
Determine if this material has a normal map. More... | |
virtual bool | HasTexture () const override |
Determine if this material has a texture. More... | |
virtual bool | LightingEnabled () const override |
Determine if lighting affects this material. More... | |
virtual Ogre::MaterialPtr | Material () const |
virtual std::string | NormalMap () const override |
Get the URI of the normal map file. More... | |
virtual void | PreRender () override |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender. More... | |
virtual bool | ReceiveShadows () const override |
Determine if this material receives shadows. More... | |
virtual bool | ReflectionEnabled () const override |
Determine if this material has a reflection. More... | |
virtual double | Reflectivity () const override |
Get the reflectivity value. More... | |
virtual void | SetAlphaFromTexture (bool _enabled, double _alpha=0.5, bool _twoSided=true) override |
Set the material to use the alpha channel from the textures. More... | |
virtual void | SetAmbient (const math::Color &_color) override |
Set the ambient color. More... | |
virtual void | SetCastShadows (const bool _castShadows) override |
Specify if this material casts shadows. More... | |
virtual void | SetDepthCheckEnabled (bool _enabled) override |
Specify if depth buffer checking is enabled. More... | |
virtual void | SetDepthMaterial (const double far, const double near) override |
Configuration for Depth Material. More... | |
virtual void | SetDepthWriteEnabled (bool _enabled) override |
Specify if depth buffer writing is enabled. More... | |
virtual void | SetDiffuse (const math::Color &_color) override |
Set the diffuse color. More... | |
virtual void | SetEmissive (const math::Color &_color) override |
Set the emissive color. More... | |
virtual void | SetFragmentShader (const std::string &_path) override |
Set the fragment shader. More... | |
virtual void | SetLightingEnabled (const bool _enabled) override |
Specify if lighting affects this material. More... | |
virtual void | SetNormalMap (const std::string &_name) override |
Set the material normal map. More... | |
virtual void | SetReceiveShadows (const bool _receiveShadows) override |
Specify if this material receives shadows. More... | |
virtual void | SetReflectionEnabled (const bool _enabled) override |
Specify if this material has a reflection. More... | |
virtual void | SetReflectivity (const double _reflectivity) override |
Set the reflectivity value. More... | |
virtual void | SetShaderType (enum ShaderType _type) override |
Set the ShaderType value. More... | |
virtual void | SetShininess (const double _shininess) override |
Set the shininess value. More... | |
virtual void | SetSpecular (const math::Color &_color) override |
Set the specular color. More... | |
virtual void | SetTexture (const std::string &_name) override |
Set the material texture. More... | |
virtual void | SetTransparency (const double _transparency) override |
Set the transparency value. More... | |
virtual void | SetVertexShader (const std::string &_path) override |
Set the vertex shader. More... | |
virtual enum ShaderType | ShaderType () const override |
Get the ShaderType value. More... | |
virtual double | Shininess () const override |
Get the shininess value. More... | |
virtual math::Color | Specular () const override |
Get the specular color. More... | |
virtual std::string | Texture () const override |
Get the URI of the texture file. More... | |
virtual double | Transparency () const override |
Get the transparency value. More... | |
virtual std::string | VertexShader () const override |
Get path to the vertex shader. More... | |
virtual ShaderParamsPtr | VertexShaderParams () override |
Get params for the vertex shader. More... | |
Public Member Functions inherited from BaseMaterial< OgreObject > | |
virtual | ~BaseMaterial () |
double | AlphaThreshold () const override |
Get the alpha threshold. More... | |
virtual void | ClearEmissiveMap () override |
Removes any emissive map mapped to this material. More... | |
virtual void | ClearEnvironmentMap () override |
Removes any environment map mapped to this material. More... | |
virtual void | ClearMetalnessMap () override |
Removes any metalness map mapped to this material. More... | |
virtual void | ClearRoughnessMap () override |
Removes any roughness map mapped to this material. More... | |
virtual MaterialPtr | Clone (const std::string &_name="") const override |
Clone this material. More... | |
virtual void | CopyFrom (ConstMaterialPtr _material) override |
Copy properties from given Material. More... | |
virtual void | CopyFrom (const common::Material &_material) override |
Copy properties from given Material. More... | |
virtual std::string | EmissiveMap () const override |
Get the URI of the emissive map file. More... | |
virtual std::string | EnvironmentMap () const override |
Get the URI of the environment map file. More... | |
virtual bool | HasEmissiveMap () const override |
Determine if this material has an emissive map. More... | |
virtual bool | HasEnvironmentMap () const override |
Determine if this material has a environment map. More... | |
virtual bool | HasMetalnessMap () const override |
Determine if this material has a metalness map. More... | |
virtual bool | HasRoughnessMap () const override |
Determine if this material has a roughness map. More... | |
virtual float | Metalness () const override |
Get the metalness value of this material. More... | |
virtual std::string | MetalnessMap () const override |
Get the URI of the metalness map file. More... | |
virtual float | Roughness () const override |
Get the roughness value of this material. More... | |
virtual std::string | RoughnessMap () const override |
Get the URI of the roughness map file. More... | |
virtual void | SetAmbient (const double _r, const double _g, const double _b, const double _a=1.0) override |
Set the ambient color. More... | |
virtual void | SetDiffuse (const double _r, const double _g, const double _b, const double _a=1.0) override |
Set the diffuse color. More... | |
virtual void | SetEmissive (const double _r, const double _g, const double _b, const double _a=1.0) override |
Set the emissive color. More... | |
virtual void | SetEmissiveMap (const std::string &_emissiveMap) override |
Set the material emissive map. More... | |
virtual void | SetEnvironmentMap (const std::string &_metalnessMap) override |
Set the material environment map. More... | |
virtual void | SetMetalness (const float _metalness) override |
Set the metalness value. Only affects material of type MT_PBS. More... | |
virtual void | SetMetalnessMap (const std::string &_metalnessMap) override |
Set the material metalness map. More... | |
virtual void | SetRoughness (const float _roughness) override |
Set the roughness value. Only affects material of type MT_PBS. More... | |
virtual void | SetRoughnessMap (const std::string &_roughnessMap) override |
Set the material roughness map. More... | |
virtual void | SetSpecular (const double _r, const double _g, const double _b, const double _a=1.0) override |
Set the specular color. More... | |
bool | TextureAlphaEnabled () const override |
Get the enable alpha from textures. More... | |
bool | TwoSidedEnabled () const override |
Get the enable two sided rendering value. More... | |
virtual MaterialType | Type () const override |
Removes any metalness map mapped to this material. More... | |
Public Member Functions inherited from Material | |
virtual | ~Material () |
Deconstructor. More... | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. More... | |
Public Member Functions inherited from OgreObject | |
virtual | ~OgreObject () |
virtual ScenePtr | Scene () const |
Get the Scene that created this object. More... | |
Public Member Functions inherited from BaseObject | |
virtual | ~BaseObject () |
virtual unsigned int | Id () const override |
Get the object ID. This ID will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More... | |
virtual std::string | Name () const override |
Get the object name. This name will be unique across all objects inside a given scene, but necessarily true for objects across different scenes. More... | |
virtual void | PostRender () override |
Post process this object and any of its children after rendering. More... | |
Public Member Functions inherited from enable_shared_from_this< BaseObject > | |
T | enable_shared_from_this (T... args) |
T | ~enable_shared_from_this (T... args) |
T | operator= (T... args) |
T | shared_from_this (T... args) |
Protected Member Functions | |
OgreMaterial () | |
virtual Ogre::TexturePtr | CreateTexture (const std::string &_name) |
virtual void | Init () override |
virtual void | LoadOneImage (const std::string &_name, Ogre::Image &_image) |
virtual void | SetTextureImpl (const std::string &_texture) |
Set the texture for this material. More... | |
virtual Ogre::TexturePtr | Texture (const std::string &_name) |
virtual void | UpdateColorOperation () |
void | UpdateShaderParams () |
bind shader parameters that have changed More... | |
void | UpdateShaderParams (ConstShaderParamsPtr _params, Ogre::GpuProgramParametersSharedPtr _ogreParams) |
Transfer params from ign-rendering type to ogre type. More... | |
virtual void | UpdateTransparency () |
Protected Member Functions inherited from BaseMaterial< OgreObject > | |
BaseMaterial () | |
virtual void | Reset () |
Protected Member Functions inherited from OgreObject | |
OgreObject () | |
Protected Member Functions inherited from BaseObject | |
BaseObject () | |
virtual void | Load () |
Protected Attributes | |
ShaderParamsPtr | fragmentShaderParams |
Parameters to be bound to the fragment shader. More... | |
std::string | fragmentShaderPath |
Path to fragment shader program. More... | |
std::string | normalMapName |
Ogre::String | ogreGroup |
Ogre::MaterialPtr | ogreMaterial |
Ogre::Pass * | ogrePass = nullptr |
Ogre::Technique * | ogreTechnique = nullptr |
Ogre::TextureUnitState * | ogreTexState = nullptr |
enum ShaderType | shaderType = ST_PIXEL |
std::string | textureName |
ShaderParamsPtr | vertexShaderParams |
Parameters to be bound to the vertex shader. More... | |
std::string | vertexShaderPath |
Path to vertex shader program. More... | |
Protected Attributes inherited from BaseMaterial< OgreObject > | |
double | alphaThreshold |
Threshold for alpha channel rejection. More... | |
math::Color | ambient |
Ambient color. More... | |
bool | castShadows |
Set to true to enable object with this material to cast shadows. More... | |
bool | depthCheckEnabled |
Flag to indicate if depth buffer checking is enabled. More... | |
bool | depthWriteEnabled |
Flag to indicate if depth buffer writing is enabled. More... | |
math::Color | diffuse |
Diffuse color. More... | |
math::Color | emissive |
Emissive color. More... | |
bool | lightingEnabled |
Flag to indicate if dynamic lighting is enabled. More... | |
bool | receiveShadows |
True if material receives shadows. More... | |
bool | reflectionEnabled |
Flag to indicate if reflection is enabled. More... | |
double | reflectivity |
Reflectivity. More... | |
double | shininess |
Shininess factor. More... | |
math::Color | specular |
Specular color. More... | |
bool | textureAlphaEnabled |
Enable alpha channel based texture transparency. More... | |
double | transparency |
Transparent. 1: fully transparent, 0: opaque. More... | |
bool | twoSidedEnabled |
Enable two sided rendering. More... | |
Protected Attributes inherited from OgreObject | |
OgreScenePtr | scene |
Protected Attributes inherited from BaseObject | |
unsigned int | id |
std::string | name |
Constructor & Destructor Documentation
◆ OgreMaterial()
|
protected |
◆ ~OgreMaterial()
|
virtual |
Member Function Documentation
◆ Ambient()
|
overridevirtual |
◆ CastShadows()
|
overridevirtual |
Determine if this material casts shadows.
- Returns
- True if this material casts shadows
Reimplemented from BaseMaterial< OgreObject >.
◆ ClearNormalMap()
|
overridevirtual |
Removes any normal map mapped to this material.
Reimplemented from BaseMaterial< OgreObject >.
◆ ClearTexture()
|
overridevirtual |
Removes any texture mapped to this material.
Reimplemented from BaseMaterial< OgreObject >.
◆ CreateTexture()
|
protectedvirtual |
◆ DepthCheckEnabled()
|
overridevirtual |
Determine if depth buffer checking is enabled.
- Returns
- True if depth check is enabled
Reimplemented from BaseMaterial< OgreObject >.
◆ DepthWriteEnabled()
|
overridevirtual |
Determine if depth buffer writing is enabled.
- Returns
- True if depth buffer writing is enabled
Reimplemented from BaseMaterial< OgreObject >.
◆ Destroy()
|
overridevirtual |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior.
Reimplemented from BaseObject.
◆ Diffuse()
|
overridevirtual |
◆ Emissive()
|
overridevirtual |
◆ FragmentShader()
|
overridevirtual |
Get path to the fragment shader.
- Returns
- Path to fragment shader
Reimplemented from BaseMaterial< OgreObject >.
◆ FragmentShaderParams()
|
overridevirtual |
Get params for the fragment shader.
- Returns
- editable parameters
Reimplemented from BaseMaterial< OgreObject >.
◆ HasNormalMap()
|
overridevirtual |
Determine if this material has a normal map.
- Returns
- True if this material has a normal map
Reimplemented from BaseMaterial< OgreObject >.
◆ HasTexture()
|
overridevirtual |
Determine if this material has a texture.
- Returns
- True if this material has a texture
Reimplemented from BaseMaterial< OgreObject >.
◆ Init()
|
overrideprotectedvirtual |
Reimplemented from BaseObject.
◆ LightingEnabled()
|
overridevirtual |
Determine if lighting affects this material.
- Returns
- True if lighting affects this material
Reimplemented from BaseMaterial< OgreObject >.
◆ LoadOneImage()
|
protectedvirtual |
◆ Material()
|
virtual |
◆ NormalMap()
|
overridevirtual |
Get the URI of the normal map file.
- Returns
- URI of the normal map file
Reimplemented from BaseMaterial< OgreObject >.
◆ PreRender()
|
overridevirtual |
Prepare this object and any of its children for rendering. This should be called for each object in a scene just before rendering, which can be achieved by a single call to Scene::PreRender.
Reimplemented from BaseMaterial< OgreObject >.
◆ ReceiveShadows()
|
overridevirtual |
Determine if this material receives shadows.
- Returns
- True if this material receives shadows
Reimplemented from BaseMaterial< OgreObject >.
◆ ReflectionEnabled()
|
overridevirtual |
Determine if this material has a reflection.
- Returns
- True if this material has a reflection
Reimplemented from BaseMaterial< OgreObject >.
◆ Reflectivity()
|
overridevirtual |
Get the reflectivity value.
- Returns
- The reflectivity value
Reimplemented from BaseMaterial< OgreObject >.
◆ SetAlphaFromTexture()
|
overridevirtual |
Set the material to use the alpha channel from the textures.
- Parameters
-
[in] _enabled Enable alpha channel based rendering [in] _alpha Set the alpha threshold value [in] _twoSided Enable two sided rendering
Reimplemented from BaseMaterial< OgreObject >.
◆ SetAmbient()
|
overridevirtual |
Set the ambient color.
- Parameters
-
[in] _color New ambient color
Reimplemented from BaseMaterial< OgreObject >.
◆ SetCastShadows()
|
overridevirtual |
Specify if this material casts shadows.
- Parameters
-
[in] _castShadows True if this material casts shadows
Reimplemented from BaseMaterial< OgreObject >.
◆ SetDepthCheckEnabled()
|
overridevirtual |
Specify if depth buffer checking is enabled.
- Parameters
-
[in] _enabled True if depth check is enabled
Reimplemented from BaseMaterial< OgreObject >.
◆ SetDepthMaterial()
|
overridevirtual |
Configuration for Depth Material.
- Parameters
-
[in] far Far distance for normalized output [in] near Near distance for normalized output
Reimplemented from BaseMaterial< OgreObject >.
◆ SetDepthWriteEnabled()
|
overridevirtual |
Specify if depth buffer writing is enabled.
- Parameters
-
[in] _enabled True if depth buffer writing is enabled
Reimplemented from BaseMaterial< OgreObject >.
◆ SetDiffuse()
|
overridevirtual |
Set the diffuse color.
- Parameters
-
[in] _color New diffuse color
Reimplemented from BaseMaterial< OgreObject >.
◆ SetEmissive()
|
overridevirtual |
Set the emissive color.
- Parameters
-
[in] _color New emissive color
Reimplemented from BaseMaterial< OgreObject >.
◆ SetFragmentShader()
|
overridevirtual |
Set the fragment shader.
- Parameters
-
[in] _path path to a file containing a glsl shader
Reimplemented from BaseMaterial< OgreObject >.
◆ SetLightingEnabled()
|
overridevirtual |
Specify if lighting affects this material.
- Parameters
-
[in] _enabled True if lighting affects this material
Reimplemented from BaseMaterial< OgreObject >.
◆ SetNormalMap()
|
overridevirtual |
Set the material normal map.
- Parameters
-
[in] _name URI of the new normal map file
Reimplemented from BaseMaterial< OgreObject >.
◆ SetReceiveShadows()
|
overridevirtual |
Specify if this material receives shadows.
- Parameters
-
[in] _receiveShadows True if this material receives shadows
Reimplemented from BaseMaterial< OgreObject >.
◆ SetReflectionEnabled()
|
overridevirtual |
Specify if this material has a reflection.
- Parameters
-
[in] _enabled True if this material has a reflection
Reimplemented from BaseMaterial< OgreObject >.
◆ SetReflectivity()
|
overridevirtual |
Set the reflectivity value.
- Parameters
-
[in] _reflectivity New reflectivity value
Reimplemented from BaseMaterial< OgreObject >.
◆ SetShaderType()
|
overridevirtual |
Set the ShaderType value.
- Parameters
-
[in] _type New ShaderType value
Reimplemented from BaseMaterial< OgreObject >.
◆ SetShininess()
|
overridevirtual |
Set the shininess value.
- Parameters
-
[in] _shininess New shininess value
Reimplemented from BaseMaterial< OgreObject >.
◆ SetSpecular()
|
overridevirtual |
Set the specular color.
- Parameters
-
[in] _color New specular color
Reimplemented from BaseMaterial< OgreObject >.
◆ SetTexture()
|
overridevirtual |
Set the material texture.
- Parameters
-
[in] _name URI of the new texture file
Reimplemented from BaseMaterial< OgreObject >.
◆ SetTextureImpl()
|
protectedvirtual |
Set the texture for this material.
- Parameters
-
[in] _texture Name of the texture.
◆ SetTransparency()
|
overridevirtual |
Set the transparency value.
- Parameters
-
[in] _transparency New transparency value
Reimplemented from BaseMaterial< OgreObject >.
◆ SetVertexShader()
|
overridevirtual |
Set the vertex shader.
- Parameters
-
[in] _path path to a file containing a glsl shader
Reimplemented from BaseMaterial< OgreObject >.
◆ ShaderType()
|
overridevirtual |
Get the ShaderType value.
- Returns
- The ShaderType value
Reimplemented from BaseMaterial< OgreObject >.
◆ Shininess()
|
overridevirtual |
◆ Specular()
|
overridevirtual |
◆ Texture() [1/2]
|
overridevirtual |
Get the URI of the texture file.
- Returns
- URI of the texture file
Reimplemented from BaseMaterial< OgreObject >.
◆ Texture() [2/2]
|
protectedvirtual |
◆ Transparency()
|
overridevirtual |
Get the transparency value.
- Returns
- The transparency value
Reimplemented from BaseMaterial< OgreObject >.
◆ UpdateColorOperation()
|
protectedvirtual |
◆ UpdateShaderParams() [1/2]
|
protected |
bind shader parameters that have changed
◆ UpdateShaderParams() [2/2]
|
protected |
Transfer params from ign-rendering type to ogre type.
- Parameters
-
[in] _params ignition rendering params [out] _ogreParams ogre type for holding params
◆ UpdateTransparency()
|
protectedvirtual |
◆ VertexShader()
|
overridevirtual |
Get path to the vertex shader.
- Returns
- Path to vertex shader
Reimplemented from BaseMaterial< OgreObject >.
◆ VertexShaderParams()
|
overridevirtual |
Get params for the vertex shader.
- Returns
- editable parameters
Reimplemented from BaseMaterial< OgreObject >.
Member Data Documentation
◆ fragmentShaderParams
|
protected |
Parameters to be bound to the fragment shader.
◆ fragmentShaderPath
|
protected |
Path to fragment shader program.
◆ normalMapName
|
protected |
◆ ogreGroup
|
protected |
◆ ogreMaterial
|
protected |
◆ ogrePass
|
protected |
◆ ogreTechnique
|
protected |
◆ ogreTexState
|
protected |
◆ shaderType
|
protected |
◆ textureName
|
protected |
◆ vertexShaderParams
|
protected |
Parameters to be bound to the vertex shader.
◆ vertexShaderPath
|
protected |
Path to vertex shader program.
The documentation for this class was generated from the following file: