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

Exchange pixels at random positions. More...

#include <ProceduralTextureModifiers.h>

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

Public Member Functions

 Jitter (TextureBufferPtr pBuffer)
 Default constructor. More...
 
JittersetRadius (Ogre::uchar radius)
 Set the radius of the detection area. More...
 
JittersetSeed (Ogre::uint seed)
 Set the seed for "random" number generator. 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

Exchange pixels at random positions.

Exchange pixels in a small area randomly.

Example:

Procedural::TextureBuffer bufferImage(256);
Procedural::Image(&bufferImage).setFile("red_brick.jpg").process();
Procedural::Jitter(&bufferImage).process();

dot_texture_17.png

Constructor & Destructor Documentation

◆ Jitter()

Procedural::Jitter::Jitter ( 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::Jitter::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

◆ setRadius()

Jitter& Procedural::Jitter::setRadius ( Ogre::uchar  radius)

Set the radius of the detection area.

Parameters
radiusNew radius for detection area [0, 255] (default 57)

◆ setSeed()

Jitter& Procedural::Jitter::setSeed ( Ogre::uint  seed)

Set the seed for "random" number generator.

Parameters
seedSeed value where to set the random number generator (default 5120)

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::Image::process
TextureBufferPtr process()
Run image generation.
Procedural::Image
Load an image from a resource.
Definition: ProceduralTextureGenerator.h:334
Procedural::Jitter::process
TextureBufferPtr process()
Run image manipulation.
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Image::setFile
Image & setFile(Ogre::String filename, Ogre::String groupname=Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME)
Set the colour of the background.
Procedural::Jitter
Exchange pixels at random positions.
Definition: ProceduralTextureModifiers.h:1727