Fills full image with noise in a given colour. More...
#include <noisegenerator.h>
Public Types | |
typedef std::vector< Real > | NoiseField |
Convenience typedef for a container of generated noise. | |
Public Member Functions | |
NoiseGenerator () | |
Class constructor. | |
virtual | ~NoiseGenerator () |
Class destructor. | |
virtual void | AddToTextureBuffer (TextureBuffer &Buffer) const |
Replaces and populates the pixels as configured in this generator to a TextureBuffer. More... | |
virtual String | GetName () const |
Gets the name of this generator. More... | |
NoiseGenerator & | SetColour (const ColourValue &Colour) |
Sets the colour of the background. More... | |
NoiseGenerator & | SetColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0) |
Set the colour of the background. More... | |
NoiseGenerator & | SetSeed (const Whole Seed) |
Sets the seed for the "random" number generator. More... | |
NoiseGenerator & | SetType (const Procedural::NoiseType Type) |
Set the type of noise generation. More... | |
Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureGenerator | |
TextureGenerator () | |
Blank constructor. | |
virtual | ~TextureGenerator () |
Class destructor. | |
TextureBuffer | BuildTextureBuffer (const Whole SquareSize) const |
Creates a TextureBuffer with the pixels as configured in this generator. More... | |
TextureBuffer | BuildTextureBuffer (const Whole TexWidth, const Whole TexHeight) const |
Creates a TextureBuffer with the pixels as configured in this generator. More... | |
Image * | GenerateImage (const Whole SquareSize, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const |
Generates the Image. More... | |
Image * | GenerateImage (const Whole TexWidth, const Whole TexHeight, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const |
Generates the Image. More... | |
Texture * | GenerateTexture (const Whole SquareSize, const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const |
Generates the Texture. More... | |
Texture * | GenerateTexture (const Whole TexWidth, const Whole TexHeight, const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const |
Generates the Texture. More... | |
Protected Member Functions | |
void | FitToRange (NoiseField &ToNormalize, const Real MinVal, const Real MaxVal) const |
Converts all of the values in a NoiseField to a 0-1 range. More... | |
NoiseField | GeneratePerlinNoiseField (const Whole X, const Whole Y) const |
Generates a grid of perlin noise. More... | |
NoiseField | GenerateWhiteNoiseField (const Whole X, const Whole Y) const |
Generates a grid of white noise. More... | |
Protected Attributes | |
ColourValue | GenColour |
The colour of the noise to be generated. More... | |
Whole | GenSeed |
The seed to be used for the random number generator. More... | |
Procedural::NoiseType | NType |
The type of noise generator to use when generating the image. More... | |
Fills full image with noise in a given colour.
High quality noise with various noise algorithms.
Definition at line 82 of file noisegenerator.h.
|
virtual |
Replaces and populates the pixels as configured in this generator to a TextureBuffer.
Buffer | The buffer to place this generators pixels in. |
Implements Mezzanine::Graphics::Procedural::TextureGenerator.
Definition at line 147 of file noisegenerator.cpp.
|
protected |
Converts all of the values in a NoiseField to a 0-1 range.
ToNormalize | The NoiseField to be converted. |
MinVal | The minimum value generated in the provided field. |
MaxVal | The maximum value generated in the provided field. |
Definition at line 92 of file noisegenerator.cpp.
|
protected |
Generates a grid of perlin noise.
X | The width of the field to generate. |
Y | The height of the field to generate. |
Definition at line 103 of file noisegenerator.cpp.
|
protected |
Generates a grid of white noise.
X | The width of the field to generate. |
Y | The height of the field to generate. |
Definition at line 125 of file noisegenerator.cpp.
|
virtual |
Gets the name of this generator.
Implements Mezzanine::Graphics::Procedural::TextureGenerator.
Definition at line 180 of file noisegenerator.cpp.
NoiseGenerator & Mezzanine::Graphics::Procedural::NoiseGenerator::SetColour | ( | const ColourValue & | Colour | ) |
Sets the colour of the background.
Colour | The colour to be applied to the noise to be generated. |
Definition at line 186 of file noisegenerator.cpp.
NoiseGenerator & Mezzanine::Graphics::Procedural::NoiseGenerator::SetColour | ( | const Real | Red, |
const Real | Green, | ||
const Real | Blue, | ||
const Real | Alpha = 1.0 |
||
) |
Set the colour of the background.
Red | The Red component for the background colour. Range: [0.0, 1.0]. |
Green | The Green component for the background colour. Range: [0.0, 1.0]. |
Blue | The Blue component for the background colour. Range: [0.0, 1.0]. |
Alpha | The Alpha component for the background colour. Range: [0.0, 1.0]. |
Definition at line 192 of file noisegenerator.cpp.
NoiseGenerator & Mezzanine::Graphics::Procedural::NoiseGenerator::SetSeed | ( | const Whole | Seed | ) |
Sets the seed for the "random" number generator.
Seed | The seed value for the random number generator. Initial Value: 5120. |
Definition at line 198 of file noisegenerator.cpp.
NoiseGenerator & Mezzanine::Graphics::Procedural::NoiseGenerator::SetType | ( | const Procedural::NoiseType | Type | ) |
Set the type of noise generation.
Type | Type of noise generator. Initial Value: NT_White. |
Definition at line 204 of file noisegenerator.cpp.
|
protected |
The colour of the noise to be generated.
Definition at line 90 of file noisegenerator.h.
|
protected |
The seed to be used for the random number generator.
Definition at line 93 of file noisegenerator.h.
|
protected |
The type of noise generator to use when generating the image.
Definition at line 96 of file noisegenerator.h.