67 #ifndef _graphicsprocedurallerpgenerator_cpp
68 #define _graphicsprocedurallerpgenerator_cpp
70 #include "Graphics/Procedural/Texture/lerpgenerator.h"
84 InterpolateAmount(0.5)
104 for(
Whole Y = 0 ; Y < TargetHeight ; ++Y )
106 for(
Whole X = 0 ; X < TargetWidth ; ++X )
126 {
return "LerpGenerator"; }
145 if( Amount >= 0.0 && Amount <= 1.0 ) {
ColourChannelType & GetPixel(const Whole X, const Whole Y, const UInt16 Component)
Gets access to the pixel at the specified position in this buffer. the X or Y location go beyond the ...
A simple functor for interpolating data points in a simple way.
Real InterpolateAmount
The amount to interpolate each colour channel of the provided textures.
Whole GetWidth() const
Get the pixel width of this texture.
#define MEZZ_EXCEPTION(num, desc)
An easy way to throw exceptions with rich information.
TextureBuffer * FirstTexture
The first texture to interpolate.
This is a simple class for holding 4 reals representing the colour any give object or lightsource can...
This implements the exception hiearchy for Mezzanine.
float Real
A Datatype used to represent a real floating point number.
Real GreenChannel
Value from 0.0 to 1.0 representing the amount of green present in the colour. 1.0 if very green...
LerpGenerator & SetInterpolateAmount(const Real Amount)
Sets how much interpolation between the two textures to do.
LerpGenerator()
Class constructor.
Real AlphaChannel
Value from 0.0 to 1.0 representing the transparency of the colours. 1.0 is opaque and 0...
LerpGenerator & SetFirstTexture(TextureBuffer *First)
The first texture to interpolate. the texture provided here isn't at least the same size as the textu...
virtual void AddToTextureBuffer(TextureBuffer &Buffer) const
Replaces and populates the pixels as configured in this generator to a TextureBuffer.
virtual ~LerpGenerator()
Class destructor.
TextureBuffer * SecondTexture
The second texture to interpolate.
Thrown when parameters are checked at runtime and found invalid.
A convenience buffer that stores pixel colour values of a texture to be generated.
static T InterpolateMath(T Begin, T End, Real Location)
Get a value at a given location between exactly two others.
The bulk of the engine components go in this namspace.
unsigned long Whole
Whole is an unsigned integer, it will be at least 32bits in size.
Whole GetHeight() const
Get the pixel height of this texture.
Real BlueChannel
Value from 0.0 to 1.0 representing the amount of blue present in the colour. 1.0 if very blue...
void SetPixel(const Whole X, const Whole Y, const ColourValue &Colour)
Set colour of a specified pixel using a ColourValue. the X or Y location go beyond the set size of th...
Real RedChannel
Value from 0.0 to 1.0 representing the amount of red present in the colour. 1.0 if very red...
Helper classes to assist in generating data points between two other data points. ...
std::string String
A datatype used to a series of characters.
LerpGenerator & SetSecondTexture(TextureBuffer *Second)
The second texture to interpolate. the texture provided here isn't at least the same size as the text...
virtual String GetName() const
Gets the name of this generator.
Creates a texture that is the interpolated result between two other textures.