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

A modifier that will use the colours of the texture to be modified to perform a linear interpolation between two other textures. More...

#include <weighedlerpmodifier.h>

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

Public Member Functions

 WeighedLerpModifier ()
 Blank constructor.
 
virtual ~WeighedLerpModifier ()
 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...
 
WeighedLerpModifierSetFirstTexture (TextureBuffer *First)
 The first texture to interpolate.

Exceptions
Ifthe texture provided here isn't at least the same size as the texture to be modified a PARAMETERS_EXCEPTION will be thrown.
More...
 
WeighedLerpModifierSetSecondTexture (TextureBuffer *Second)
 The second texture to interpolate.

Exceptions
Ifthe texture provided here isn't at least the same size as the texture to be modified a PARAMETERS_EXCEPTION will be thrown.
More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

TextureBufferFirstTexture
 The first texture to interpolate. More...
 
TextureBufferSecondTexture
 The second texture to interpolate. More...
 

Detailed Description

A modifier that will use the colours of the texture to be modified to perform a linear interpolation between two other textures.

This modifier will perform a Lerp operation between the two specified textures. This differs from the LerpGenerator in that the texture to be modified is used to determine the amount of interpolation there is to be performed. This operation is done on each colour channel of each pixel. The result of the Lerp is then written back to the texture.

Definition at line 84 of file weighedlerpmodifier.h.

Member Function Documentation

String Mezzanine::Graphics::Procedural::WeighedLerpModifier::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 125 of file weighedlerpmodifier.cpp.

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

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.
Remarks
This image provides the weights that determine how much interpolation between the two parameters image there is to perfrom, and then writes the result to this buffer.

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

Definition at line 92 of file weighedlerpmodifier.cpp.

WeighedLerpModifier & Mezzanine::Graphics::Procedural::WeighedLerpModifier::SetFirstTexture ( TextureBuffer First)

The first texture to interpolate.

Exceptions
Ifthe texture provided here isn't at least the same size as the texture to be modified a PARAMETERS_EXCEPTION will be thrown.

Parameters
FirstA pointer to the first texture to interpolate between. Initial Value: NULL.
Returns
Returns a reference to this.

Definition at line 131 of file weighedlerpmodifier.cpp.

WeighedLerpModifier & Mezzanine::Graphics::Procedural::WeighedLerpModifier::SetSecondTexture ( TextureBuffer Second)

The second texture to interpolate.

Exceptions
Ifthe texture provided here isn't at least the same size as the texture to be modified a PARAMETERS_EXCEPTION will be thrown.

Parameters
SecondA pointer to the second texture to interpolate between. Initial Value: NULL.
Returns
Returns a reference to this.

Definition at line 137 of file weighedlerpmodifier.cpp.

Member Data Documentation

TextureBuffer* Mezzanine::Graphics::Procedural::WeighedLerpModifier::FirstTexture
protected

The first texture to interpolate.

Definition at line 89 of file weighedlerpmodifier.h.

TextureBuffer* Mezzanine::Graphics::Procedural::WeighedLerpModifier::SecondTexture
protected

The second texture to interpolate.

Definition at line 92 of file weighedlerpmodifier.h.


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