#include <BaseMaterial.hh>
Public Member Functions | |
virtual | ~BaseMaterial () |
double | AlphaThreshold () const override |
Get the alpha threshold. More... | |
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 | 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 | ClearLightMap () override |
Removes any light map mapped to this material. More... | |
virtual void | ClearMetalnessMap () override |
Removes any metalness map mapped to this material. More... | |
virtual void | ClearNormalMap () override |
Removes any normal map mapped to this material. More... | |
virtual void | ClearRoughnessMap () override |
Removes any roughness map mapped to this material. More... | |
virtual void | ClearTexture () override |
Removes any texture mapped to this material. More... | |
virtual MaterialPtr | Clone (const std::string &_name="") const override |
Clone this material. More... | |
virtual void | CopyFrom (const common::Material &_material) override |
Copy properties from given Material. More... | |
virtual void | CopyFrom (ConstMaterialPtr _material) override |
Copy properties from given 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 math::Color | Diffuse () const override |
Get the diffuse color. More... | |
virtual math::Color | Emissive () const override |
Get the emissive color. More... | |
virtual std::string | EmissiveMap () const override |
Get the URI of the emissive map file. More... | |
virtual std::shared_ptr< const common::Image > | EmissiveMapData () const override |
Get the emissive map data. More... | |
virtual std::string | EnvironmentMap () const override |
Get the URI of the environment map file. More... | |
virtual std::shared_ptr< const common::Image > | EnvironmentMapData () const override |
Get the environment map data. 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 | 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 | HasLightMap () const override |
Determine if this material has a light map. More... | |
virtual bool | HasMetalnessMap () const override |
Determine if this material has a metalness map. More... | |
virtual bool | HasNormalMap () const override |
Determine if this material has a normal map. More... | |
virtual bool | HasRoughnessMap () const override |
Determine if this material has a roughness 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 std::string | LightMap () const override |
Get the URI of the light map file. More... | |
virtual std::shared_ptr< const common::Image > | LightMapData () const override |
Get the light map data. More... | |
virtual unsigned int | LightMapTexCoordSet () const override |
Get the texture coordinate set used by lightmap. 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 std::shared_ptr< const common::Image > | MetalnessMapData () const override |
Get the metalness map data. More... | |
virtual std::string | NormalMap () const override |
Get the URI of the normal map file. More... | |
virtual std::shared_ptr< const common::Image > | NormalMapData () const override |
Get the normal map data. 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 float | RenderOrder () const override |
Get the render order value of this material. 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 std::shared_ptr< const common::Image > | RoughnessMapData () const override |
Get the roughness map data. 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 double _r, const double _g, const double _b, const double _a=1.0) override |
Set the ambient color. 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 double _r, const double _g, const double _b, const double _a=1.0) override |
Set the diffuse color. More... | |
virtual void | SetDiffuse (const math::Color &_color) 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 | SetEmissive (const math::Color &_color) override |
Set the emissive color. More... | |
virtual void | SetEmissiveMap (const std::string &_emissiveMap, const std::shared_ptr< const common::Image > &_img) override |
Set the material emissive map. More... | |
virtual void | SetEnvironmentMap (const std::string &_environmentMap, const std::shared_ptr< const common::Image > &_img) override |
Set the material environment map. 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 | SetLightMap (const std::string &_lightMap, const std::shared_ptr< const common::Image > &_img, unsigned int _uvSet=0u) override |
Set the material light map from an image loaded in memory. 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, const std::shared_ptr< const common::Image > &_img) override |
Set the material metalness map. More... | |
virtual void | SetNormalMap (const std::string &_normalMap, const std::shared_ptr< const common::Image > &_img) 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 | SetRenderOrder (const float _renderOrder) override |
Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel. This param help to avoid this problem. 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, const std::shared_ptr< const common::Image > &_img) override |
Set the material roughness map. 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 double _r, const double _g, const double _b, const double _a=1.0) override |
Set the specular color. More... | |
virtual void | SetSpecular (const math::Color &_color) override |
Set the specular color. More... | |
virtual void | SetTexture (const std::string &_texture, const std::shared_ptr< const common::Image > &_img) 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... | |
bool | TextureAlphaEnabled () const override |
Get the enable alpha from textures. More... | |
virtual std::shared_ptr< const common::Image > | TextureData () const override |
Get the texture data. More... | |
virtual double | Transparency () const override |
Get the transparency value. 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... | |
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 Material | |
virtual | ~Material () |
Destructor. More... | |
virtual void | SetEmissiveMap (const std::string &_emissiveMap) |
Set the material emissive map. More... | |
virtual void | SetEnvironmentMap (const std::string &_environmentMap) |
Set the material environment map. More... | |
virtual void | SetLightMap (const std::string &_lightMap, unsigned int _uvSet=0u) |
Set the material light map. More... | |
virtual void | SetMetalnessMap (const std::string &_metalnessMap) |
Set the material metalness map. More... | |
virtual void | SetNormalMap (const std::string &_normalMap) |
Set the material normal map. More... | |
virtual void | SetRoughnessMap (const std::string &_roughnessMap) |
Set the material roughness map. More... | |
virtual void | SetTexture (const std::string &_texture) |
Set the material texture. More... | |
Public Member Functions inherited from Object | |
virtual | ~Object () |
Destructor. More... | |
virtual void | Destroy ()=0 |
Destroy any resources associated with this object. Invoking any other functions after destroying an object will result in undefined behavior. More... | |
virtual unsigned int | Id () const =0 |
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 =0 |
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 ()=0 |
Post process this object and any of its children after rendering. More... | |
virtual ScenePtr | Scene () const =0 |
Get the Scene that created this object. More... | |
Protected Member Functions | |
BaseMaterial () | |
virtual void | Reset () |
Protected Attributes | |
double | alphaThreshold = 0.5 |
Threshold for alpha channel rejection. More... | |
math::Color | ambient |
Ambient color. More... | |
bool | castShadows = true |
Set to true to enable object with this material to cast shadows. More... | |
bool | depthCheckEnabled = true |
Flag to indicate if depth buffer checking is enabled. More... | |
bool | depthWriteEnabled = true |
Flag to indicate if depth buffer writing is enabled. More... | |
math::Color | diffuse |
Diffuse color. More... | |
math::Color | emissive |
Emissive color. More... | |
bool | lightingEnabled = false |
Flag to indicate if dynamic lighting is enabled. More... | |
bool | receiveShadows = true |
True if material receives shadows. More... | |
bool | reflectionEnabled = false |
Flag to indicate if reflection is enabled. More... | |
double | reflectivity = 0.0 |
Reflectivity. More... | |
double | renderOrder = 0.0 |
Material render order. More... | |
double | shininess = 0.0 |
Shininess factor. More... | |
math::Color | specular |
Specular color. More... | |
bool | textureAlphaEnabled = false |
Enable alpha channel based texture transparency. More... | |
double | transparency = 0.0 |
Transparent. 1: fully transparent, 0: opaque. More... | |
bool | twoSidedEnabled = false |
Enable two sided rendering. More... | |
Constructor & Destructor Documentation
◆ BaseMaterial()
|
protected |
◆ ~BaseMaterial()
|
virtual |
Member Function Documentation
◆ AlphaThreshold()
|
overridevirtual |
◆ Ambient()
|
overridevirtual |
◆ CastShadows()
|
overridevirtual |
Determine if this material casts shadows.
- Returns
- True if this material casts shadows
Implements Material.
◆ ClearEmissiveMap()
|
overridevirtual |
Removes any emissive map mapped to this material.
Implements Material.
Reimplemented in Ogre2Material.
◆ ClearEnvironmentMap()
|
overridevirtual |
Removes any environment map mapped to this material.
Implements Material.
Reimplemented in Ogre2Material.
◆ ClearLightMap()
|
overridevirtual |
◆ ClearMetalnessMap()
|
overridevirtual |
Removes any metalness map mapped to this material.
Implements Material.
Reimplemented in Ogre2Material.
◆ ClearNormalMap()
|
overridevirtual |
Removes any normal map mapped to this material.
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ ClearRoughnessMap()
|
overridevirtual |
Removes any roughness map mapped to this material.
Implements Material.
Reimplemented in Ogre2Material.
◆ ClearTexture()
|
overridevirtual |
Removes any texture mapped to this material.
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ Clone()
|
overridevirtual |
◆ CopyFrom() [1/2]
|
overridevirtual |
◆ CopyFrom() [2/2]
|
overridevirtual |
◆ DepthCheckEnabled()
|
overridevirtual |
Determine if depth buffer checking is enabled.
- Returns
- True if depth check is enabled
Implements Material.
◆ DepthWriteEnabled()
|
overridevirtual |
Determine if depth buffer writing is enabled.
- Returns
- True if depth buffer writing is enabled
Implements Material.
◆ Diffuse()
|
overridevirtual |
◆ Emissive()
|
overridevirtual |
◆ EmissiveMap()
|
overridevirtual |
◆ EmissiveMapData()
|
overridevirtual |
Get the emissive map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ EnvironmentMap()
|
overridevirtual |
Get the URI of the environment map file.
- Returns
- URI of the environment map file
Implements Material.
◆ EnvironmentMapData()
|
overridevirtual |
Get the environment map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ FragmentShader()
|
overridevirtual |
◆ FragmentShaderParams()
|
overridevirtual |
Get params for the fragment shader.
- Returns
- editable parameters
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ HasEmissiveMap()
|
overridevirtual |
Determine if this material has an emissive map.
- Returns
- True if this material has an emissive map
Implements Material.
◆ HasEnvironmentMap()
|
overridevirtual |
Determine if this material has a environment map.
- Returns
- True if this material has a environment map
Implements Material.
◆ HasLightMap()
|
overridevirtual |
Determine if this material has a light map.
- Returns
- True if this material has a light map
Implements Material.
◆ HasMetalnessMap()
|
overridevirtual |
Determine if this material has a metalness map.
- Returns
- True if this material has a metalness map
Implements Material.
◆ HasNormalMap()
|
overridevirtual |
Determine if this material has a normal map.
- Returns
- True if this material has a normal map
Implements Material.
◆ HasRoughnessMap()
|
overridevirtual |
Determine if this material has a roughness map.
- Returns
- True if this material has a roughness map
Implements Material.
◆ HasTexture()
|
overridevirtual |
Determine if this material has a texture.
- Returns
- True if this material has a texture
Implements Material.
◆ LightingEnabled()
|
overridevirtual |
Determine if lighting affects this material.
- Returns
- True if lighting affects this material
Implements Material.
◆ LightMap()
|
overridevirtual |
◆ LightMapData()
|
overridevirtual |
Get the light map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ LightMapTexCoordSet()
|
overridevirtual |
Get the texture coordinate set used by lightmap.
- Returns
- texture coordinate set of the light map
Implements Material.
◆ Metalness()
|
overridevirtual |
◆ MetalnessMap()
|
overridevirtual |
◆ MetalnessMapData()
|
overridevirtual |
Get the metalness map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ NormalMap()
|
overridevirtual |
◆ NormalMapData()
|
overridevirtual |
Get the normal map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ 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.
Implements Object.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ ReceiveShadows()
|
overridevirtual |
Determine if this material receives shadows.
- Returns
- True if this material receives shadows
Implements Material.
◆ ReflectionEnabled()
|
overridevirtual |
Determine if this material has a reflection.
- Returns
- True if this material has a reflection
Implements Material.
◆ Reflectivity()
|
overridevirtual |
◆ RenderOrder()
|
overridevirtual |
◆ Reset()
|
protectedvirtual |
◆ Roughness()
|
overridevirtual |
◆ RoughnessMap()
|
overridevirtual |
◆ RoughnessMapData()
|
overridevirtual |
Get the roughness map data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ 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
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetAmbient() [1/2]
|
overridevirtual |
Set the ambient color.
- Parameters
-
[in] _r Red value [in] _g Green value [in] _b Blue value [in] _a Alpha value
Implements Material.
◆ SetAmbient() [2/2]
|
overridevirtual |
Set the ambient color.
- Parameters
-
[in] _color New ambient color
Implements Material.
Reimplemented in OgreMaterial.
◆ SetCastShadows()
|
overridevirtual |
Specify if this material casts shadows.
- Parameters
-
[in] _castShadows True if this material casts shadows
Implements Material.
Reimplemented in OgreMaterial.
◆ SetDepthCheckEnabled()
|
overridevirtual |
Specify if depth buffer checking is enabled.
- Parameters
-
[in] _enabled True if depth check is enabled
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ SetDepthMaterial()
|
overridevirtual |
Configuration for Depth Material.
- Parameters
-
[in] far Far distance for normalized output [in] near Near distance for normalized output
Implements Material.
Reimplemented in OgreMaterial.
◆ SetDepthWriteEnabled()
|
overridevirtual |
Specify if depth buffer writing is enabled.
- Parameters
-
[in] _enabled True if depth buffer writing is enabled
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ SetDiffuse() [1/2]
|
overridevirtual |
Set the diffuse color.
- Parameters
-
[in] _r Red value [in] _g Green value [in] _b Blue value [in] _a Alpha value
Implements Material.
◆ SetDiffuse() [2/2]
|
overridevirtual |
Set the diffuse color.
- Parameters
-
[in] _color New diffuse color
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetEmissive() [1/2]
|
overridevirtual |
Set the emissive color.
- Parameters
-
[in] _r Red value [in] _g Green value [in] _b Blue value [in] _a Alpha value
Implements Material.
◆ SetEmissive() [2/2]
|
overridevirtual |
Set the emissive color.
- Parameters
-
[in] _color New emissive color
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetEmissiveMap()
|
overridevirtual |
Set the material emissive map.
- Parameters
-
[in] _emissiveMap Map URI of the new emissive map file, or identifying name if map was set from raw data [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in Ogre2Material.
◆ SetEnvironmentMap()
|
overridevirtual |
Set the material environment map.
- Parameters
-
[in] _environmentMap URI of the new environment map file, or identifying name if map was set from raw data [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in Ogre2Material.
◆ SetFragmentShader()
|
overridevirtual |
Set the fragment shader.
- Parameters
-
[in] _path path to a file containing a glsl shader
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ SetLightingEnabled()
|
overridevirtual |
Specify if lighting affects this material.
- Parameters
-
[in] _enabled True if lighting affects this material
Implements Material.
Reimplemented in OgreMaterial.
◆ SetLightMap()
|
overridevirtual |
Set the material light map from an image loaded in memory.
- Parameters
-
[in] _lightMap URI of the new light map file [in] _img Image data, nullptr if the image should be loaded from a file [in] _uvSet Texture coordinate set to use
Reimplemented from Material.
Reimplemented in Ogre2Material.
◆ SetMetalness()
|
overridevirtual |
Set the metalness value. Only affects material of type MT_PBS.
- Parameters
-
[in] _metalness Metalness to set to
Implements Material.
Reimplemented in Ogre2Material.
◆ SetMetalnessMap()
|
overridevirtual |
Set the material metalness map.
- Parameters
-
[in] _metalnessMap URI of the new metalness map file, or identifying name if map was set from raw data [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in Ogre2Material.
◆ SetNormalMap()
|
overridevirtual |
Set the material normal map.
- Parameters
-
[in] _normalMap URI of the new normal map file, or identifying name if map was set from raw data [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetReceiveShadows()
|
overridevirtual |
Specify if this material receives shadows.
- Parameters
-
[in] _receiveShadows True if this material receives shadows
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetReflectionEnabled()
|
overridevirtual |
Specify if this material has a reflection.
- Parameters
-
[in] _enabled True if this material has a reflection
Implements Material.
Reimplemented in OgreMaterial.
◆ SetReflectivity()
|
overridevirtual |
Set the reflectivity value.
- Parameters
-
[in] _reflectivity New reflectivity value
Implements Material.
Reimplemented in OgreMaterial.
◆ SetRenderOrder()
|
overridevirtual |
Set the render order. When polygons are coplanar, you can get problems with 'depth fighting' where the pixels from the two polys compete for the same screen pixel. This param help to avoid this problem.
- Parameters
-
[in] _renderOrder Render order to set to
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetRoughness()
|
overridevirtual |
Set the roughness value. Only affects material of type MT_PBS.
- Parameters
-
[in] _roughness Roughness to set to
Implements Material.
Reimplemented in Ogre2Material.
◆ SetRoughnessMap()
|
overridevirtual |
Set the material roughness map.
- Parameters
-
[in] _roughnessMap URI of the new roughness map file, or identifying name if map was set from raw data [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in Ogre2Material.
◆ SetShaderType()
|
inlineoverridevirtual |
Set the ShaderType value.
- Parameters
-
[in] _type New ShaderType value
Implements Material.
Reimplemented in OgreMaterial.
◆ SetShininess()
|
overridevirtual |
Set the shininess value.
- Parameters
-
[in] _shininess New shininess value
Implements Material.
Reimplemented in OgreMaterial.
◆ SetSpecular() [1/2]
|
overridevirtual |
Set the specular color.
- Parameters
-
[in] _r Red value [in] _g Green value [in] _b Blue value [in] _a Alpha value
Implements Material.
◆ SetSpecular() [2/2]
|
overridevirtual |
Set the specular color.
- Parameters
-
[in] _color New specular color
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetTexture()
|
overridevirtual |
Set the material texture.
- Parameters
-
[in] _texture URI of the new texture file or identifying name if _img is set [in] _img Image data, nullptr if the image should be loaded from a file
Reimplemented from Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetTransparency()
|
overridevirtual |
Set the transparency value.
- Parameters
-
[in] _transparency New transparency value
Implements Material.
Reimplemented in OgreMaterial, and Ogre2Material.
◆ SetVertexShader()
|
overridevirtual |
Set the vertex shader.
- Parameters
-
[in] _path path to a file containing a glsl shader
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
◆ ShaderType()
|
inlineoverridevirtual |
◆ Shininess()
|
overridevirtual |
◆ Specular()
|
overridevirtual |
◆ Texture()
|
overridevirtual |
◆ TextureAlphaEnabled()
|
overridevirtual |
◆ TextureData()
|
overridevirtual |
Get the texture data.
- Returns
- Pointer to the common::Image with the data if the texture was loaded from memory
Implements Material.
◆ Transparency()
|
overridevirtual |
◆ TwoSidedEnabled()
|
overridevirtual |
Get the enable two sided rendering value.
- Returns
- The enable two sided rendering value
Implements Material.
◆ Type()
|
overridevirtual |
Removes any metalness map mapped to this material.
Implements Material.
◆ VertexShader()
|
overridevirtual |
◆ VertexShaderParams()
|
overridevirtual |
Get params for the vertex shader.
- Returns
- editable parameters
Implements Material.
Reimplemented in Ogre2Material, and OgreMaterial.
Member Data Documentation
◆ alphaThreshold
|
protected |
Threshold for alpha channel rejection.
◆ ambient
|
protected |
Ambient color.
◆ castShadows
|
protected |
Set to true to enable object with this material to cast shadows.
◆ depthCheckEnabled
|
protected |
Flag to indicate if depth buffer checking is enabled.
◆ depthWriteEnabled
|
protected |
Flag to indicate if depth buffer writing is enabled.
◆ diffuse
|
protected |
Diffuse color.
◆ emissive
|
protected |
Emissive color.
◆ lightingEnabled
|
protected |
Flag to indicate if dynamic lighting is enabled.
◆ receiveShadows
|
protected |
True if material receives shadows.
◆ reflectionEnabled
|
protected |
Flag to indicate if reflection is enabled.
◆ reflectivity
|
protected |
Reflectivity.
◆ renderOrder
|
protected |
Material render order.
◆ shininess
|
protected |
Shininess factor.
◆ specular
|
protected |
Specular color.
◆ textureAlphaEnabled
|
protected |
Enable alpha channel based texture transparency.
◆ transparency
|
protected |
Transparent. 1: fully transparent, 0: opaque.
◆ twoSidedEnabled
|
protected |
Enable two sided rendering.
The documentation for this class was generated from the following file: