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

Use alpha channel as an mask for an other image. More...

#include <ProceduralTextureModifiers.h>

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

Public Member Functions

 AlphaMask (TextureBufferPtr pBuffer)
 Default constructor. More...
 
AlphaMasksetColourAlphaMask (bool colourmask)
 Set mode of alpha masking. More...
 
AlphaMasksetParameterImage (TextureBufferPtr image)
 Set parameter image for masking/colouring. 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

Use alpha channel as an mask for an other image.

  1. Extract alpha channel as an opaque monochrome bitmap or
  2. multiply alpha channel with prameter image luminance, or
  3. use parameter image as color alpha mask.

The luminance is not taken into account.

Example:

dot_texture_04.png

Constructor & Destructor Documentation

◆ AlphaMask()

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

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setColourAlphaMask()

AlphaMask& Procedural::AlphaMask::setColourAlphaMask ( bool  colourmask)

Set mode of alpha masking.

Parameters
colourmaskIf set to true parameter image will be used as alph mask (default false)

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setParameterImage()

AlphaMask& Procedural::AlphaMask::setParameterImage ( TextureBufferPtr  image)

Set parameter image for masking/colouring.

Parameters
imagePointer to second image (default NULL)
Note
Methode 1 is used if the parameter image is set to zero. If the size of the parameter image is smaller than the base buffer the operation will be canceled without any image manipulation.

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::AlphaMask::setParameterImage
AlphaMask & setParameterImage(TextureBufferPtr image)
Set parameter image for masking/colouring.
Procedural::Cell::setRegularity
Cell & setRegularity(Ogre::uchar regularity)
Set the regularity of texture.
Ogre::ColourValue::Red
static const ColourValue Red
Ogre::ColourValue::Black
static const ColourValue Black
Procedural::Gradient::process
TextureBufferPtr process()
Run image generation.
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::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
Procedural::AlphaMask::process
TextureBufferPtr process()
Run image manipulation.
Procedural::AlphaMask
Use alpha channel as an mask for an other image.
Definition: ProceduralTextureModifiers.h:243