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

Fills full image with given colour gradients. More...

#include <ProceduralTextureGenerator.h>

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

Public Member Functions

 Gradient (TextureBufferPtr pBuffer)
 Default constructor. More...
 
GradientsetColourA (Ogre::ColourValue colour)
 Set the colour in the top left corner of the image. More...
 
GradientsetColourA (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour in the top left corner of the image. More...
 
GradientsetColourB (Ogre::ColourValue colour)
 Set the colour in the top right corner of the image. More...
 
GradientsetColourB (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour in the top right corner of the image. More...
 
GradientsetColourC (Ogre::ColourValue colour)
 Set the colour in the bottom left corner of the image. More...
 
GradientsetColourC (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour in the bottom left corner of the image. More...
 
GradientsetColourD (Ogre::ColourValue colour)
 Set the colour in the bottom right corner of the image. More...
 
GradientsetColourD (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour in the bottom right corner of the image. More...
 
GradientsetColours (Ogre::ColourValue colourA, Ogre::ColourValue colourB, Ogre::ColourValue colourC, Ogre::ColourValue colourD)
 Sets the colours of the image corners. More...
 
TextureBufferPtr process ()
 Run image generation. 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

Fills full image with given colour gradients.

Each corner of the image has unique color.

Example:

Constructor & Destructor Documentation

◆ Gradient()

Procedural::Gradient::Gradient ( TextureBufferPtr  pBuffer)

Default constructor.

Parameters
pBufferImage buffer where to store the generated 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::Gradient::process ( )
virtual

Run image generation.

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

Implements Procedural::TextureProcessing.

◆ setColourA() [1/2]

Gradient& Procedural::Gradient::setColourA ( Ogre::ColourValue  colour)

Set the colour in the top left corner of the image.

Parameters
colourNew colour in the top left corner for processing (default Ogre::ColourValue::Blue)

◆ setColourA() [2/2]

Gradient& Procedural::Gradient::setColourA ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour in the top left corner of the image.

Parameters
redRed value of new colour in the top left corner [0.0, 1.0] (default 0.0)
greenGreen value of new colour in the top left corner [0.0, 1.0] (default 0.0)
blueBlue value of new colour in the top left corner [0.0, 1.0] (default 1.0)
alphaAlpha value of new colour in the top left corner [0.0, 1.0] (default 1.0)

◆ setColourB() [1/2]

Gradient& Procedural::Gradient::setColourB ( Ogre::ColourValue  colour)

Set the colour in the top right corner of the image.

Parameters
colourNew colour in the top right corner for processing (default Ogre::ColourValue::Green)

◆ setColourB() [2/2]

Gradient& Procedural::Gradient::setColourB ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour in the top right corner of the image.

Parameters
redRed value of new colour in the top right corner [0.0, 1.0] (default 0.0)
greenGreen value of new colour in the top right corner [0.0, 1.0] (default 1.0)
blueBlue value of new colour in the top right corner [0.0, 1.0] (default 0.0)
alphaAlpha value of new colour in the top right corner [0.0, 1.0] (default 1.0)

◆ setColourC() [1/2]

Gradient& Procedural::Gradient::setColourC ( Ogre::ColourValue  colour)

Set the colour in the bottom left corner of the image.

Parameters
colourNew colour in the bottom left corner for processing (default Ogre::ColourValue::Red)

◆ setColourC() [2/2]

Gradient& Procedural::Gradient::setColourC ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour in the bottom left corner of the image.

Parameters
redRed value of new colour in the bottom left corner [0.0, 1.0] (default 1.0)
greenGreen value of new colour in the bottom left corner [0.0, 1.0] (default 0.0)
blueBlue value of new colour in the bottom left corner [0.0, 1.0] (default 0.0)
alphaAlpha value of new colour in the bottom left corner [0.0, 1.0] (default 1.0)

◆ setColourD() [1/2]

Gradient& Procedural::Gradient::setColourD ( Ogre::ColourValue  colour)

Set the colour in the bottom right corner of the image.

Parameters
colourNew colour in the bottom right corner for processing (default Ogre::ColourValue(0.0f, 1.0f, 1.0f))

◆ setColourD() [2/2]

Gradient& Procedural::Gradient::setColourD ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour in the bottom right corner of the image.

Parameters
redRed value of new colour in the bottom right corner [0.0, 1.0] (default 0.0)
greenGreen value of new colour in the bottom right corner [0.0, 1.0] (default 1.0)
blueBlue value of new colour in the bottom right corner [0.0, 1.0] (default 1.0)
alphaAlpha value of new colour in the bottom right corner [0.0, 1.0] (default 1.0)

◆ setColours()

Gradient& Procedural::Gradient::setColours ( Ogre::ColourValue  colourA,
Ogre::ColourValue  colourB,
Ogre::ColourValue  colourC,
Ogre::ColourValue  colourD 
)

Sets the colours of the image corners.

Parameters
colourANew colour in the top left corner (default Ogre::ColourValue::Blue)
colourBNew colour in the top right corner (default Ogre::ColourValue::Green)
colourCNew colour in the bottom left corner (default Ogre::ColourValue::Red)
colourDNew colour in the bottom right corner (default Ogre::ColourValue(0.0f, 1.0f, 1.0f))

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

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::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