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

Colour extraction. More...

#include <ProceduralTextureModifiers.h>

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

Public Member Functions

 Alpha (TextureBufferPtr pBuffer)
 Default constructor. More...
 
AlphasetExtractColour (Ogre::ColourValue colour)
 Set the colour to extract. More...
 
AlphasetExtractColour (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour to extract. 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

Colour extraction.

Extract single color intensity, replace it with white smoke, discard the rest.

Example:

Procedural::TextureBuffer bufferCell(256);
Procedural::Alpha(&bufferCell).process();

dot_texture_03.png

Constructor & Destructor Documentation

◆ Alpha()

Procedural::Alpha::Alpha ( 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::Alpha::process ( )
virtual

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setExtractColour() [1/2]

Alpha& Procedural::Alpha::setExtractColour ( Ogre::ColourValue  colour)

Set the colour to extract.

Parameters
colourNew colour for extraction (default Ogre::ColourValue::White)

◆ setExtractColour() [2/2]

Alpha& Procedural::Alpha::setExtractColour ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour to extract.

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

◆ 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:
Procedural::Cell::setDensity
Cell & setDensity(Ogre::uint density)
Set the density of cells in texture.
Procedural::Alpha
Colour extraction.
Definition: ProceduralTextureModifiers.h:190
Procedural::Cell::setRegularity
Cell & setRegularity(Ogre::uchar regularity)
Set the regularity of texture.
Procedural::Cell
Create a texture consisting of cells aligned in a grid, or a chessboard.
Definition: ProceduralTextureGenerator.h:71
Procedural::Cell::process
TextureBufferPtr process()
Run image generation.
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Alpha::process
TextureBufferPtr process()
Run image manipulation.