Ogre Procedural  0.3.0 unstable
Procedural Geometry & Textures for Ogre3D
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
Procedural::Colours Class Reference

A colour filter. More...

#include <ProceduralTextureModifiers.h>

Inheritance diagram for Procedural::Colours:
Inheritance graph
[legend]

Public Member Functions

 Colours (TextureBufferPtr pBuffer)
 Default constructor. More...
 
ColourssetColourBase (Ogre::ColourValue colour)
 Set the base colour to work on. More...
 
ColourssetColourBase (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the base colour to work on. More...
 
ColourssetColourPercent (Ogre::ColourValue colour)
 Set the percent colour to add on image. More...
 
ColourssetColourPercent (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the percent colour to add on image. More...
 
ColourssetBrightness (Ogre::uchar brightness)
 Set brightness of the image. More...
 
ColourssetContrast (Ogre::uchar contrast)
 Set contrast of the image. More...
 
ColourssetSaturation (Ogre::uchar saturation)
 Set saturation of the image. More...
 
ColourssetAlpha (Ogre::uchar alpha)
 Set alpha of the image. More...
 
TextureBufferPtr process ()
 Run image manipulation. More...
 
Ogre::String getName ()
 Get name of the filter as string. More...
 
void setLog (bool enable=true)
 Enable/Disable logging. More...
 

Protected Member Functions

void logMsg (Ogre::String msg)
 

Protected Attributes

TextureBufferPtr mBuffer
 
Ogre::String mName
 
bool mLog
 

Detailed Description

A colour filter.

Adjust colour, contrast, brightness and alpha.

Example:

dot_texture_07.png

Constructor & Destructor Documentation

◆ Colours()

Procedural::Colours::Colours ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to modify the image.

Member Function Documentation

◆ getName()

Ogre::String Procedural::TextureProcessing::getName ( )
inherited

Get name of the filter as string.

◆ logMsg()

void Procedural::TextureProcessing::logMsg ( Ogre::String  msg)
protectedinherited

◆ process()

TextureBufferPtr Procedural::Colours::process ( )
virtual

Run image manipulation.

Returns
Pointer to image buffer which has been set in the constructor.

Implements Procedural::TextureProcessing.

◆ setAlpha()

Colours& Procedural::Colours::setAlpha ( Ogre::uchar  alpha)

Set alpha of the image.

Parameters
alphaNew image alpha (default 127)

◆ setBrightness()

Colours& Procedural::Colours::setBrightness ( Ogre::uchar  brightness)

Set brightness of the image.

Parameters
brightnessNew image brightness (default 127)

◆ setColourBase() [1/2]

Colours& Procedural::Colours::setColourBase ( Ogre::ColourValue  colour)

Set the base colour to work on.

Parameters
colourNew colour to work on (default Ogre::ColourValue::Black)

◆ setColourBase() [2/2]

Colours& Procedural::Colours::setColourBase ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the base colour to work on.

Parameters
redRed value of base colour [0.0, 1.0] (default 0.0)
greenGreen value of base colour [0.0, 1.0] (default 0.0)
blueBlue value of base colour [0.0, 1.0] (default 0.0)
alphaAlpha value of base colour [0.0, 1.0] (default 0.0)

◆ setColourPercent() [1/2]

Colours& Procedural::Colours::setColourPercent ( Ogre::ColourValue  colour)

Set the percent colour to add on image.

Parameters
colourNew colour to add (default Ogre::ColourValue::White)

◆ setColourPercent() [2/2]

Colours& Procedural::Colours::setColourPercent ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the percent colour to add on image.

Parameters
redRed value of percent colour [0.0, 1.0] (default 1.0)
greenGreen value of percent colour [0.0, 1.0] (default 1.0)
blueBlue value of percent colour [0.0, 1.0] (default 1.0)
alphaAlpha value of percent colour [0.0, 1.0] (default 1.0)

◆ setContrast()

Colours& Procedural::Colours::setContrast ( Ogre::uchar  contrast)

Set contrast of the image.

Parameters
contrastNew image contrast (default 127)

◆ setLog()

void Procedural::TextureProcessing::setLog ( bool  enable = true)
inherited

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setSaturation()

Colours& Procedural::Colours::setSaturation ( Ogre::uchar  saturation)

Set saturation of the image.

Parameters
saturationNew image saturation (default 127)

Member Data Documentation

◆ mBuffer

TextureBufferPtr Procedural::TextureProcessing::mBuffer
protectedinherited

◆ mLog

bool Procedural::TextureProcessing::mLog
protectedinherited

◆ mName

Ogre::String Procedural::TextureProcessing::mName
protectedinherited

The documentation for this class was generated from the following file:
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue::Black
static const ColourValue Black
Procedural::Gradient::process
TextureBufferPtr process()
Run image generation.
Procedural::Gradient::setColours
Gradient & setColours(Ogre::ColourValue colourA, Ogre::ColourValue colourB, Ogre::ColourValue colourC, Ogre::ColourValue colourD)
Sets the colours of the image corners.
Ogre::ColourValue::Blue
static const ColourValue Blue
Procedural::Colours::setColourPercent
Colours & setColourPercent(Ogre::ColourValue colour)
Set the percent colour to add on image.
Procedural::Gradient
Fills full image with given colour gradients.
Definition: ProceduralTextureGenerator.h:229
Ogre::ColourValue::Green
static const ColourValue Green
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Colours::setColourBase
Colours & setColourBase(Ogre::ColourValue colour)
Set the base colour to work on.
Procedural::Colours::process
TextureBufferPtr process()
Run image manipulation.
Procedural::Colours
A colour filter.
Definition: ProceduralTextureModifiers.h:664