Ignition Rendering

API Reference

0.1.0

#include <OgreMaterial.hh>

Public Member Functions

virtual ~OgreMaterial ()
 
virtual math::Color Ambient () const
 Get the ambient color. More...
 
virtual bool CastShadows () const
 Determine if this material casts shadows. More...
 
virtual void ClearNormalMap ()
 Removes any normal map mapped to this material. More...
 
virtual void ClearTexture ()
 Removes any texture mapped to this material. More...
 
virtual math::Color Diffuse () const
 Get the diffuse color. More...
 
virtual math::Color Emissive () const
 Get the emissive color. More...
 
virtual bool HasNormalMap () const
 Determine if this material has a normal map. More...
 
virtual bool HasTexture () const
 Determine if this material has a texture. More...
 
virtual bool LightingEnabled () const
 Determine if lighting affects this material. More...
 
virtual Ogre::MaterialPtr Material () const
 
virtual std::string NormalMap () const
 Get the URI of the normal map file. More...
 
virtual bool ReceiveShadows () const
 Determine if this material receives shadows. More...
 
virtual bool ReflectionEnabled () const
 Determine if this material has a reflection. More...
 
virtual double Reflectivity () const
 Get the reflectivity value. More...
 
virtual void SetAmbient (const math::Color &_color)
 Set the ambient color. More...
 
virtual void SetCastShadows (const bool _castShadows)
 Specify if this material casts shadows. More...
 
virtual void SetDiffuse (const math::Color &_color)
 Set the diffuse color. More...
 
virtual void SetEmissive (const math::Color &_color)
 Set the emissive color. More...
 
virtual void SetLightingEnabled (const bool _enabled)
 Specify if lighting affects this material. More...
 
virtual void SetNormalMap (const std::string &_name)
 Set the material normal map. More...
 
virtual void SetReceiveShadows (const bool _receiveShadows)
 Specify if this material receives shadows. More...
 
virtual void SetReflectionEnabled (const bool _enabled)
 Specify if this material has a reflection. More...
 
virtual void SetReflectivity (const double _reflectivity)
 Set the reflectivity value. More...
 
virtual void SetShaderType (enum ShaderType _type)
 Set the ShaderType value. More...
 
virtual void SetShininess (const double _shininess)
 Set the shininess value. More...
 
virtual void SetSpecular (const math::Color &_color)
 Set the specular color. More...
 
virtual void SetTexture (const std::string &_name)
 Set the material texture. More...
 
virtual void SetTransparency (const double _transparency)
 Set the transparency value. More...
 
virtual enum ShaderType ShaderType () const
 Get the ShaderType value. More...
 
virtual double Shininess () const
 Get the shininess value. More...
 
virtual math::Color Specular () const
 Get the specular color. More...
 
virtual std::string Texture () const
 Get the URI of the texture file. More...
 
virtual double Transparency () const
 Get the transparency value. More...
 
- Public Member Functions inherited from BaseMaterial< OgreObject >
virtual ~BaseMaterial ()
 
virtual MaterialPtr Clone (const std::string &_name="") const
 Clone this material. More...
 
virtual void CopyFrom (ConstMaterialPtr _material)
 Copy properties from given Material. More...
 
virtual void CopyFrom (const common::Material &_material)
 Copy properties from given Material. More...
 
virtual void PreRender ()
 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 void SetAmbient (const double _r, const double _g, const double _b, const double _a=1.0)
 Set the ambient color. More...
 
virtual void SetDiffuse (const double _r, const double _g, const double _b, const double _a=1.0)
 Set the diffuse color. More...
 
virtual void SetEmissive (const double _r, const double _g, const double _b, const double _a=1.0)
 Set the emissive color. More...
 
virtual void SetSpecular (const double _r, const double _g, const double _b, const double _a=1.0)
 Set the specular color. More...
 
- Public Member Functions inherited from Material
virtual ~Material ()
 Deconstructor. More...
 
- Public Member Functions inherited from Object
virtual ~Object ()
 Deconstructor. 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 void Destroy ()
 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
 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
 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...
 
- Public Member Functions inherited from enable_shared_from_this< BaseObject >
enable_shared_from_this (T... args)
 
~enable_shared_from_this (T... args)
 
operator= (T... args)
 
shared_from_this (T... args)
 

Protected Member Functions

 OgreMaterial ()
 
virtual Ogre::TexturePtr CreateTexture (const std::string &_name)
 
virtual void Init ()
 
virtual void LoadImage (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 ()
 
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

bool castShadows = true
 
std::string normalMapName
 
Ogre::String ogreGroup
 
Ogre::MaterialPtr ogreMaterial
 
Ogre::PassogrePass = nullptr
 
Ogre::TechniqueogreTechnique = nullptr
 
Ogre::TextureUnitStateogreTexState = nullptr
 
bool reflectionEnabled = true
 
double reflectivity = 0.0
 
enum ShaderType shaderType = ST_PIXEL
 
double shininess = 0.0
 
std::string textureName
 
double transparency = 0.0
 
- Protected Attributes inherited from OgreObject
OgreScenePtr scene
 
- Protected Attributes inherited from BaseObject
unsigned int id
 
std::string name
 

Constructor & Destructor Documentation

◆ OgreMaterial()

OgreMaterial ( )
protected

◆ ~OgreMaterial()

virtual ~OgreMaterial ( )
virtual

Member Function Documentation

◆ Ambient()

virtual math::Color Ambient ( ) const
virtual

Get the ambient color.

Returns
The ambient color

Implements Material.

◆ CastShadows()

virtual bool CastShadows ( ) const
virtual

Determine if this material casts shadows.

Returns
True if this material casts shadows

Implements Material.

◆ ClearNormalMap()

virtual void ClearNormalMap ( )
virtual

Removes any normal map mapped to this material.

Implements BaseMaterial< OgreObject >.

◆ ClearTexture()

virtual void ClearTexture ( )
virtual

Removes any texture mapped to this material.

Implements BaseMaterial< OgreObject >.

◆ CreateTexture()

virtual Ogre::TexturePtr CreateTexture ( const std::string _name)
protectedvirtual

◆ Diffuse()

virtual math::Color Diffuse ( ) const
virtual

Get the diffuse color.

Returns
The diffuse color

Implements Material.

◆ Emissive()

virtual math::Color Emissive ( ) const
virtual

Get the emissive color.

Returns
The emissive color

Implements Material.

◆ HasNormalMap()

virtual bool HasNormalMap ( ) const
virtual

Determine if this material has a normal map.

Returns
True if this material has a normal map

Implements Material.

◆ HasTexture()

virtual bool HasTexture ( ) const
virtual

Determine if this material has a texture.

Returns
True if this material has a texture

Implements Material.

◆ Init()

virtual void Init ( )
protectedvirtual

Reimplemented from BaseObject.

◆ LightingEnabled()

virtual bool LightingEnabled ( ) const
virtual

Determine if lighting affects this material.

Returns
True if lighting affects this material

Implements Material.

◆ LoadImage()

virtual void LoadImage ( const std::string _name,
Ogre::Image _image 
)
protectedvirtual

◆ Material()

virtual Ogre::MaterialPtr Material ( ) const
virtual

◆ NormalMap()

virtual std::string NormalMap ( ) const
virtual

Get the URI of the normal map file.

Returns
URI of the normal map file

Implements Material.

◆ ReceiveShadows()

virtual bool ReceiveShadows ( ) const
virtual

Determine if this material receives shadows.

Returns
True if this material receives shadows

Implements Material.

◆ ReflectionEnabled()

virtual bool ReflectionEnabled ( ) const
virtual

Determine if this material has a reflection.

Returns
True if this material has a reflection

Implements Material.

◆ Reflectivity()

virtual double Reflectivity ( ) const
virtual

Get the reflectivity value.

Returns
The reflectivity value

Implements Material.

◆ SetAmbient()

virtual void SetAmbient ( const math::Color &  _color)
virtual

Set the ambient color.

Parameters
[in]_colorNew ambient color

Implements BaseMaterial< OgreObject >.

◆ SetCastShadows()

virtual void SetCastShadows ( const bool  _castShadows)
virtual

Specify if this material casts shadows.

Parameters
[in]_castShadowsTrue if this material casts shadows

Implements Material.

◆ SetDiffuse()

virtual void SetDiffuse ( const math::Color &  _color)
virtual

Set the diffuse color.

Parameters
[in]_colorNew diffuse color

Implements BaseMaterial< OgreObject >.

◆ SetEmissive()

virtual void SetEmissive ( const math::Color &  _color)
virtual

Set the emissive color.

Parameters
[in]_colorNew emissive color

Implements BaseMaterial< OgreObject >.

◆ SetLightingEnabled()

virtual void SetLightingEnabled ( const bool  _enabled)
virtual

Specify if lighting affects this material.

Parameters
[in]_enabledTrue if lighting affects this material

Implements Material.

◆ SetNormalMap()

virtual void SetNormalMap ( const std::string _name)
virtual

Set the material normal map.

Parameters
[in]_nameURI of the new normal map file

Implements Material.

◆ SetReceiveShadows()

virtual void SetReceiveShadows ( const bool  _receiveShadows)
virtual

Specify if this material receives shadows.

Parameters
[in]_receiveShadowsTrue if this material receives shadows

Implements BaseMaterial< OgreObject >.

◆ SetReflectionEnabled()

virtual void SetReflectionEnabled ( const bool  _enabled)
virtual

Specify if this material has a reflection.

Parameters
[in]_enabledTrue if this material has a reflection

Implements Material.

◆ SetReflectivity()

virtual void SetReflectivity ( const double  _reflectivity)
virtual

Set the reflectivity value.

Parameters
[in]_reflectivityNew reflectivity value

Implements Material.

◆ SetShaderType()

virtual void SetShaderType ( enum ShaderType  _type)
virtual

Set the ShaderType value.

Parameters
[in]_typeNew ShaderType value

Implements BaseMaterial< OgreObject >.

◆ SetShininess()

virtual void SetShininess ( const double  _shininess)
virtual

Set the shininess value.

Parameters
[in]_shininessNew shininess value

Implements Material.

◆ SetSpecular()

virtual void SetSpecular ( const math::Color &  _color)
virtual

Set the specular color.

Parameters
[in]_colorNew specular color

Implements BaseMaterial< OgreObject >.

◆ SetTexture()

virtual void SetTexture ( const std::string _name)
virtual

Set the material texture.

Parameters
[in]_nameURI of the new texture file

Implements Material.

◆ SetTextureImpl()

virtual void SetTextureImpl ( const std::string _texture)
protectedvirtual

Set the texture for this material.

Parameters
[in]_textureName of the texture.

◆ SetTransparency()

virtual void SetTransparency ( const double  _transparency)
virtual

Set the transparency value.

Parameters
[in]_transparencyNew transparency value

Implements Material.

◆ ShaderType()

virtual enum ShaderType ShaderType ( ) const
virtual

Get the ShaderType value.

Returns
The ShaderType value

Implements Material.

◆ Shininess()

virtual double Shininess ( ) const
virtual

Get the shininess value.

Returns
The shininess value

Implements Material.

◆ Specular()

virtual math::Color Specular ( ) const
virtual

Get the specular color.

Returns
The specular color

Implements Material.

◆ Texture() [1/2]

virtual std::string Texture ( ) const
virtual

Get the URI of the texture file.

Returns
URI of the texture file

Implements Material.

◆ Texture() [2/2]

virtual Ogre::TexturePtr Texture ( const std::string _name)
protectedvirtual

◆ Transparency()

virtual double Transparency ( ) const
virtual

Get the transparency value.

Returns
The transparency value

Implements Material.

◆ UpdateColorOperation()

virtual void UpdateColorOperation ( )
protectedvirtual

◆ UpdateTransparency()

virtual void UpdateTransparency ( )
protectedvirtual

Member Data Documentation

◆ castShadows

bool castShadows = true
protected

◆ normalMapName

std::string normalMapName
protected

◆ ogreGroup

Ogre::String ogreGroup
protected

◆ ogreMaterial

Ogre::MaterialPtr ogreMaterial
protected

◆ ogrePass

Ogre::Pass* ogrePass = nullptr
protected

◆ ogreTechnique

Ogre::Technique* ogreTechnique = nullptr
protected

◆ ogreTexState

Ogre::TextureUnitState* ogreTexState = nullptr
protected

◆ reflectionEnabled

bool reflectionEnabled = true
protected

◆ reflectivity

double reflectivity = 0.0
protected

◆ shaderType

enum ShaderType shaderType = ST_PIXEL
protected

◆ shininess

double shininess = 0.0
protected

◆ textureName

std::string textureName
protected

◆ transparency

double transparency = 0.0
protected

The documentation for this class was generated from the following file: