|
Ogre Procedural
0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
|
Apply an illumination on a surface. More...
#include <ProceduralTextureModifiers.h>

Protected Member Functions | |
| void | logMsg (Ogre::String msg) |
Protected Attributes | |
| TextureBufferPtr | mBuffer |
| Ogre::String | mName |
| bool | mLog |
Apply an illumination on a surface.
The parameter image is the required normal map. You can also set ambient, diffuse and specular light with different colors and intensity.
Example:
| Procedural::TextureLightBaker::TextureLightBaker | ( | TextureBufferPtr | pBuffer | ) |
Default constructor.
| pBuffer | Image buffer where to modify the image. |
|
inherited |
Get name of the filter as string.
|
protectedinherited |
|
virtual |
Run image manipulation.
Implements Procedural::TextureProcessing.
| TextureLightBaker& Procedural::TextureLightBaker::setBumpPower | ( | Ogre::uchar | power | ) |
Set bump mapping power.
| power | New power value for bump mapping (default 0) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourAmbient | ( | Ogre::ColourValue | colour | ) |
Set the ambient light colour.
| colour | New ambient light colour (default Ogre::ColourValue::Black) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourAmbient | ( | Ogre::Real | red, |
| Ogre::Real | green, | ||
| Ogre::Real | blue, | ||
| Ogre::Real | alpha = 1.0f |
||
| ) |
Set the ambient light colour.
| red | Red value of ambient light colour [0.0, 1.0] (default 0.0) |
| green | Green value of ambient light colour [0.0, 1.0] (default 0.0) |
| blue | Blue value of ambient light colour [0.0, 1.0] (default 0.0) |
| alpha | Alpha value of ambient light colour [0.0, 1.0] (default 0.0) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourDiffuse | ( | Ogre::ColourValue | colour | ) |
Set the diffuse light colour.
| colour | New diffuse light colour (default Ogre::ColourValue(0.5f, 0.5f, 0.5f, 1.0f)) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourDiffuse | ( | Ogre::Real | red, |
| Ogre::Real | green, | ||
| Ogre::Real | blue, | ||
| Ogre::Real | alpha = 1.0f |
||
| ) |
Set the diffuse light colour.
| red | Red value of diffuse light colour [0.0, 1.0] (default 0.5) |
| green | Green value of diffuse light colour [0.0, 1.0] (default 0.5) |
| blue | Blue value of diffuse light colour [0.0, 1.0] (default 0.5) |
| alpha | Alpha value of diffuse light colour [0.0, 1.0] (default 1.0) |
| TextureLightBaker& Procedural::TextureLightBaker::setColours | ( | Ogre::ColourValue | ambient, |
| Ogre::ColourValue | diffuse, | ||
| Ogre::ColourValue | specular | ||
| ) |
Set the light colours.
| ambient | New ambient light colour (default Ogre::ColourValue::Black) |
| diffuse | New diffuse light colour (default Ogre::ColourValue(0.5f, 0.5f, 0.5f, 1.0f)) |
| specular | New specular light colour (default Ogre::ColourValue::White) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourSpecular | ( | Ogre::ColourValue | colour | ) |
Set the specular light colour.
| colour | New specular light colour (default Ogre::ColourValue::White) |
| TextureLightBaker& Procedural::TextureLightBaker::setColourSpecular | ( | Ogre::Real | red, |
| Ogre::Real | green, | ||
| Ogre::Real | blue, | ||
| Ogre::Real | alpha = 1.0f |
||
| ) |
Set the specular light colour.
| red | Red value of specular light colour [0.0, 1.0] (default 1.0) |
| green | Green value of specular light colour [0.0, 1.0] (default 1.0) |
| blue | Blue value of specular light colour [0.0, 1.0] (default 1.0) |
| alpha | Alpha value of specular light colour [0.0, 1.0] (default 1.0) |
|
inherited |
Enable/Disable logging.
| enable | true enables logging of filter actions |
| TextureLightBaker& Procedural::TextureLightBaker::setNormalMap | ( | TextureBufferPtr | normal | ) |
Set parameter image for compensation.
| normal | Pointer to an normal map image (default NULL) |
| TextureLightBaker& Procedural::TextureLightBaker::setPosition | ( | Ogre::Real | x, |
| Ogre::Real | y, | ||
| Ogre::Real | z | ||
| ) |
Set the position of light on/over the image.
| x | New light position on x axis (default 255.0f) |
| y | New light position on y axis (default 255.0f) |
| z | New light position on z axis (default 127.0f) |
| TextureLightBaker& Procedural::TextureLightBaker::setPosition | ( | Ogre::Vector3 | position | ) |
Set the position of light on/over the image.
| position | New light position (default Ogre::Vector3(255.0f, 255.0f, 127.0f)) |
| TextureLightBaker& Procedural::TextureLightBaker::setSpecularPower | ( | Ogre::uchar | power | ) |
Set specular light power.
| power | New power value for specular light (default 0) |
|
protectedinherited |
|
protectedinherited |
|
protectedinherited |
1.8.17