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::Noise Class Reference

Fills full image with noise in a given colour. More...

#include <ProceduralTextureGenerator.h>

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

Public Types

enum  NOISE_TYPE { NOISE_WHITE, NOISE_PERLIN }
 Noise generator type. More...
 

Public Member Functions

 Noise (TextureBufferPtr pBuffer)
 Default constructor. More...
 
NoisesetColour (Ogre::ColourValue colour)
 Set the colour of the noise. More...
 
NoisesetColour (Ogre::Real red, Ogre::Real green, Ogre::Real blue, Ogre::Real alpha=1.0f)
 Set the colour of the noise. More...
 
NoisesetSeed (Ogre::uint seed)
 Set the seed for "random" number generator. More...
 
NoisesetType (NOISE_TYPE type)
 Set the type of noise generation. 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 noise in a given colour.

High quality noise with various noise algorithms.

Examples: White noise (default)

Perlin noise

Member Enumeration Documentation

◆ NOISE_TYPE

Noise generator type.

Enumerator
NOISE_WHITE 

White noise.

NOISE_PERLIN 

Perlin noise.

Constructor & Destructor Documentation

◆ Noise()

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

Run image generation.

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

Implements Procedural::TextureProcessing.

◆ setColour() [1/2]

Noise& Procedural::Noise::setColour ( Ogre::ColourValue  colour)

Set the colour of the noise.

Parameters
colourNew colour of the noise (default Ogre::ColourValue::White)

◆ setColour() [2/2]

Noise& Procedural::Noise::setColour ( Ogre::Real  red,
Ogre::Real  green,
Ogre::Real  blue,
Ogre::Real  alpha = 1.0f 
)

Set the colour of the noise.

Parameters
redRed value of the noise colour [0.0, 1.0] (default 1.0)
greenGreen value of the noise colour [0.0, 1.0] (default 1.0)
blueBlue value of the noise colour [0.0, 1.0] (default 1.0)
alphaAlpha value of the noise 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

◆ setSeed()

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

Set the seed for "random" number generator.

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

◆ setType()

Noise& Procedural::Noise::setType ( NOISE_TYPE  type)

Set the type of noise generation.

Parameters
typeType of noise generator (default NOISE_WHITE)

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::Noise::NOISE_PERLIN
@ NOISE_PERLIN
Perlin noise.
Definition: ProceduralTextureGenerator.h:500
Procedural::Noise::process
TextureBufferPtr process()
Run image generation.
Procedural::Noise::setType
Noise & setType(NOISE_TYPE type)
Set the type of noise generation.
Procedural::Noise
Fills full image with noise in a given colour.
Definition: ProceduralTextureGenerator.h:493
Procedural::TextureBuffer
class to store image data while processing
Definition: ProceduralTextureBuffer.h:50
Procedural::Noise::NOISE_WHITE
@ NOISE_WHITE
White noise.
Definition: ProceduralTextureGenerator.h:499