Spinning Topp Logo BlackTopp Studios
inc
Public Member Functions | Protected Attributes | List of all members
Mezzanine::Graphics::Procedural::WoodGenerator Class Reference

Creates a wood slice image. More...

#include <woodgenerator.h>

+ Inheritance diagram for Mezzanine::Graphics::Procedural::WoodGenerator:
+ Collaboration diagram for Mezzanine::Graphics::Procedural::WoodGenerator:

Public Member Functions

 WoodGenerator ()
 Blank constructor.
 
 WoodGenerator (const Whole Rings, const ColourValue &Colour)
 Seedless constructor. More...
 
 WoodGenerator (const Whole Seed, const Whole Rings, const ColourValue &Colour)
 Descriptive constructor. More...
 
virtual ~WoodGenerator ()
 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...
 
WoodGeneratorSetColour (const ColourValue &Colour)
 Sets the colour of the background. More...
 
WoodGeneratorSetColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the background. More...
 
WoodGeneratorSetRings (const Whole Rings)
 Sets the number of annual rings. More...
 
WoodGeneratorSetSeed (const Whole Seed)
 Sets the seed for the "random" number generator. More...
 
WoodGeneratorSetTurbulence (const Real Turb)
 Sets the turbulence that will modify the generated pattern. 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...
 
ImageGenerateImage (const Whole SquareSize, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Image. More...
 
ImageGenerateImage (const Whole TexWidth, const Whole TexHeight, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Image. More...
 
TextureGenerateTexture (const Whole SquareSize, const String &TexName, const String &TexGroup, const Graphics::PixelFormat Format=Graphics::PF_R8G8B8A8) const
 Generates the Texture. More...
 
TextureGenerateTexture (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 Attributes

ColourValue GenColour
 The background colour of the texture to be generated. More...
 
Whole GenRings
 The number of annual rings to be rendered. More...
 
Whole GenSeed
 The seed to be used for the random number generator. More...
 
Real GenTurbulence
 The amount of disruption to apply to the pattern. More...
 

Detailed Description

Creates a wood slice image.

Creates a structure of annual rings from a specified perlin noise on a coloured background.

Definition at line 82 of file woodgenerator.h.

Constructor & Destructor Documentation

Mezzanine::Graphics::Procedural::WoodGenerator::WoodGenerator ( const Whole  Rings,
const ColourValue Colour 
)

Seedless constructor.

Parameters
RingsThe number of annual rings. Values under 3 will be ignored.
ColourThe colour to be applied to the wood to be generated.

Definition at line 89 of file woodgenerator.cpp.

Mezzanine::Graphics::Procedural::WoodGenerator::WoodGenerator ( const Whole  Seed,
const Whole  Rings,
const ColourValue Colour 
)

Descriptive constructor.

Parameters
SeedThe seed value for the random number generator.
RingsThe number of annual rings. Values under 3 will be ignored.
ColourThe colour to be applied to the wood to be generated.

Definition at line 96 of file woodgenerator.cpp.

Member Function Documentation

void Mezzanine::Graphics::Procedural::WoodGenerator::AddToTextureBuffer ( TextureBuffer Buffer) const
virtual

Replaces and populates the pixels as configured in this generator to a TextureBuffer.

Parameters
BufferThe buffer to place this generators pixels in.

Implements Mezzanine::Graphics::Procedural::TextureGenerator.

Definition at line 109 of file woodgenerator.cpp.

String Mezzanine::Graphics::Procedural::WoodGenerator::GetName ( ) const
virtual

Gets the name of this generator.

Returns
Returns a String containing the name of this generator.

Implements Mezzanine::Graphics::Procedural::TextureGenerator.

Definition at line 139 of file woodgenerator.cpp.

WoodGenerator & Mezzanine::Graphics::Procedural::WoodGenerator::SetColour ( const ColourValue Colour)

Sets the colour of the background.

Parameters
ColourThe colour to be applied to the wood to be generated.
Returns
Returns a reference to this.

Definition at line 145 of file woodgenerator.cpp.

WoodGenerator & Mezzanine::Graphics::Procedural::WoodGenerator::SetColour ( const Real  Red,
const Real  Green,
const Real  Blue,
const Real  Alpha = 1.0 
)

Sets the colour of the background.

Parameters
RedThe Red component for the background colour. Range: [0.0, 1.0].
GreenThe Green component for the background colour. Range: [0.0, 1.0].
BlueThe Blue component for the background colour. Range: [0.0, 1.0].
AlphaThe Alpha component for the background colour. Range: [0.0, 1.0].
Returns
Returns a reference to this.

Definition at line 151 of file woodgenerator.cpp.

WoodGenerator & Mezzanine::Graphics::Procedural::WoodGenerator::SetRings ( const Whole  Rings)

Sets the number of annual rings.

Parameters
RingsThe number of annual rings. Values under 3 will be ignored. Initial Value: 8.
Returns
Returns a reference to this.

Definition at line 169 of file woodgenerator.cpp.

WoodGenerator & Mezzanine::Graphics::Procedural::WoodGenerator::SetSeed ( const Whole  Seed)

Sets the seed for the "random" number generator.

Parameters
SeedThe seed value for the random number generator. Initial Value: 5120.
Returns
Returns a reference to this.

Definition at line 163 of file woodgenerator.cpp.

WoodGenerator & Mezzanine::Graphics::Procedural::WoodGenerator::SetTurbulence ( const Real  Turb)

Sets the turbulence that will modify the generated pattern.

Parameters
TurbThe amount of disruption to apply to the pattern. Initial Value: 0.01.
Returns
Returns a reference to this.

Definition at line 157 of file woodgenerator.cpp.

Member Data Documentation

ColourValue Mezzanine::Graphics::Procedural::WoodGenerator::GenColour
protected

The background colour of the texture to be generated.

Definition at line 87 of file woodgenerator.h.

Whole Mezzanine::Graphics::Procedural::WoodGenerator::GenRings
protected

The number of annual rings to be rendered.

Definition at line 96 of file woodgenerator.h.

Whole Mezzanine::Graphics::Procedural::WoodGenerator::GenSeed
protected

The seed to be used for the random number generator.

Definition at line 93 of file woodgenerator.h.

Real Mezzanine::Graphics::Procedural::WoodGenerator::GenTurbulence
protected

The amount of disruption to apply to the pattern.

Definition at line 90 of file woodgenerator.h.


The documentation for this class was generated from the following files: