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

A modifer that will draw coloured pixels at random positions on the texture. More...

#include <randompixelsmodifier.h>

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

Public Member Functions

 RandomPixelsModifier ()
 Blank constructor.
 
virtual ~RandomPixelsModifier ()
 Class destructor.
 
virtual String GetName () const
 Gets the name of this modifier. More...
 
virtual void Modify (TextureBuffer &Buffer)
 Alters the generated pixels in a TextureBuffer. More...
 
RandomPixelsModifierSetColour (const ColourValue &Colour)
 Sets the colour of the pixels to be generated. More...
 
RandomPixelsModifierSetColour (const Real Red, const Real Green, const Real Blue, const Real Alpha=1.0)
 Sets the colour of the pixels to be generated. More...
 
RandomPixelsModifierSetColour (const UInt8 Red, const UInt8 Green, const UInt8 Blue, const UInt8 Alpha)
 Sets the colour of the pixels to be generated. More...
 
RandomPixelsModifierSetPixelCount (const Whole Count)
 Sets the number of pixels to generate. More...
 
RandomPixelsModifierSetSeed (const Whole Seed)
 Sets the seed for the random number generator used to determine pixel positions. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

Whole GeneratorSeed
 The seed to be used for the randomly generatated texture positions the pixels will be drawn to. More...
 
ColourValue PixelColour
 The colour of the randomly placed pixels. More...
 
Whole PixelCount
 The number of randomly placed pixels to generate. More...
 

Detailed Description

A modifer that will draw coloured pixels at random positions on the texture.

Definition at line 82 of file randompixelsmodifier.h.

Member Function Documentation

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

Gets the name of this modifier.

Returns
Returns a string containing the name of this modifier.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 131 of file randompixelsmodifier.cpp.

void Mezzanine::Graphics::Procedural::RandomPixelsModifier::Modify ( TextureBuffer Buffer)
virtual

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.

Implements Mezzanine::Graphics::Procedural::TextureModifier.

Definition at line 93 of file randompixelsmodifier.cpp.

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

Sets the colour of the pixels to be generated.

Parameters
ColourThe colour of the randomly placed pixels. Initial Value: 1.0, 1.0, 1.0, 1.0.
Returns
Returns a reference to this.

Definition at line 134 of file randompixelsmodifier.cpp.

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

Sets the colour of the pixels to be generated.

Parameters
RedThe Red component for the colour of the randomly generated pixels. Initial Value: 1.0.
GreenThe Green component for the colour of the randomly generated pixels. Initial Value: 1.0.
BlueThe Blue component for the colour of the randomly generated pixels. Initial Value: 1.0.
AlphaThe Alpha component for the colour of the randomly generated pixels. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 137 of file randompixelsmodifier.cpp.

RandomPixelsModifier & Mezzanine::Graphics::Procedural::RandomPixelsModifier::SetColour ( const UInt8  Red,
const UInt8  Green,
const UInt8  Blue,
const UInt8  Alpha 
)

Sets the colour of the pixels to be generated.

Parameters
RedThe Red component for the colour of the randomly generated pixels. Initial Value: 1.0.
GreenThe Green component for the colour of the randomly generated pixels. Initial Value: 1.0.
BlueThe Blue component for the colour of the randomly generated pixels. Initial Value: 1.0.
AlphaThe Alpha component for the colour of the randomly generated pixels. Initial Value: 1.0.
Returns
Returns a reference to this.

Definition at line 140 of file randompixelsmodifier.cpp.

RandomPixelsModifier & Mezzanine::Graphics::Procedural::RandomPixelsModifier::SetPixelCount ( const Whole  Count)

Sets the number of pixels to generate.

Remarks
If this is left as zero then the number of pixels generated will be decided based on the textures size, taking the square root of both the width and height, adding them together, and multiplying by 10.
Parameters
CountThe number of randomly placed pixels to generate. Initial Value: 0.
Returns
Returns a reference to this.

Definition at line 143 of file randompixelsmodifier.cpp.

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

Sets the seed for the random number generator used to determine pixel positions.

Parameters
SeedThe seed to be used for the randomly generatated texture positions the pixels will be drawn to. Initial Value: 5120.
Returns
Returns a reference to this.

Definition at line 146 of file randompixelsmodifier.cpp.

Member Data Documentation

Whole Mezzanine::Graphics::Procedural::RandomPixelsModifier::GeneratorSeed
protected

The seed to be used for the randomly generatated texture positions the pixels will be drawn to.

Definition at line 93 of file randompixelsmodifier.h.

ColourValue Mezzanine::Graphics::Procedural::RandomPixelsModifier::PixelColour
protected

The colour of the randomly placed pixels.

Definition at line 87 of file randompixelsmodifier.h.

Whole Mezzanine::Graphics::Procedural::RandomPixelsModifier::PixelCount
protected

The number of randomly placed pixels to generate.

Definition at line 90 of file randompixelsmodifier.h.


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