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

Simple threshold filter. More...

#include <ProceduralTextureModifiers.h>

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

Public Types

enum  THRESHOLD_MODE { MODE_EXPAND_DOWNWARDS, MODE_EXPAND_UPWARDS, MODE_COMPRESS_BELOW, MODE_COMPRESS_ABOVE }
 Selection what to do with image parts below/above the threshould value. More...
 

Public Member Functions

 Threshold (TextureBufferPtr pBuffer)
 Default constructor. More...
 
ThresholdsetThreshold (Ogre::uchar threshold)
 Set threshold value. More...
 
ThresholdsetRatio (Ogre::uchar ratio)
 Set threshold ratio which affects the painting mode. More...
 
ThresholdsetMode (THRESHOLD_MODE mode)
 Set threshold mode. 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

Simple threshold filter.

Change luminance curve around given value.

Example:

dot_texture_28.png

Member Enumeration Documentation

◆ THRESHOLD_MODE

Selection what to do with image parts below/above the threshould value.

Enumerator
MODE_EXPAND_DOWNWARDS 

Set pixel below threshould value to black.

MODE_EXPAND_UPWARDS 

Set pixel above threshould value to white.

MODE_COMPRESS_BELOW 

Set pixel below threshould value to an avarage value of all pixel below threshould value.

MODE_COMPRESS_ABOVE 

Set pixel above threshould value to an avarage value of all pixel above threshould value.

Constructor & Destructor Documentation

◆ Threshold()

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

Run image manipulation.

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

Implements Procedural::TextureProcessing.

◆ setLog()

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

Enable/Disable logging.

Parameters
enabletrue enables logging of filter actions

◆ setMode()

Threshold& Procedural::Threshold::setMode ( THRESHOLD_MODE  mode)

Set threshold mode.

Parameters
modeNew mode what to do with pixels below/above threshold value (default MODE_EXPAND_DOWNWARDS)

◆ setRatio()

Threshold& Procedural::Threshold::setRatio ( Ogre::uchar  ratio)

Set threshold ratio which affects the painting mode.

Parameters
ratioNew painting factor [0, 255] (default 128)

◆ setThreshold()

Threshold& Procedural::Threshold::setThreshold ( Ogre::uchar  threshold)

Set threshold value.

Parameters
thresholdNew threshold value [0, 255] (default 128)

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::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::Threshold
Simple threshold filter.
Definition: ProceduralTextureModifiers.h:2815
Procedural::Threshold::process
TextureBufferPtr process()
Run image manipulation.