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

A modifier that uses an image to lookup and copy pixels of another image. More...

#include <lookupmodifier.h>

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

Public Member Functions

 LookupModifier ()
 Blank constructor.
 
virtual ~LookupModifier ()
 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...
 
LookupModifierSetLookupTexture (TextureBuffer *Lookup)
 Sets the texture that will be used to retrieve pixel coordinates. More...
 
- Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier
 TextureModifier ()
 Blank constructor.
 
virtual ~TextureModifier ()
 Class destructor.
 

Protected Attributes

TextureBufferLookupTexture
 A pointer to the image to use for pixel lookups. More...
 

Detailed Description

A modifier that uses an image to lookup and copy pixels of another image.

This modifier will, for each pixel, first retrieve the red and green intensities for that pixel in the lookup texture. Then convert those intensities into UV coordinates and retrieve the colour of the pixel at those coordinates from the texture being modified. That colour is then written into a temporary buffer that is the final result of this modifier.

Definition at line 85 of file lookupmodifier.h.

Member Function Documentation

String Mezzanine::Graphics::Procedural::LookupModifier::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 121 of file lookupmodifier.cpp.

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

Alters the generated pixels in a TextureBuffer.

Parameters
BufferThe buffer to be modified.
Exceptions
TheLookupTexture and the Buffer to be modified must be the same size. Otherwise an INVALID_STATE_EXCEPTION will be thrown.

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

Definition at line 90 of file lookupmodifier.cpp.

LookupModifier & Mezzanine::Graphics::Procedural::LookupModifier::SetLookupTexture ( TextureBuffer Lookup)

Sets the texture that will be used to retrieve pixel coordinates.

Parameters
LookupA pointer to the image to use for pixel lookups.
Returns
Returns a reference to this.

Definition at line 127 of file lookupmodifier.cpp.

Member Data Documentation

TextureBuffer* Mezzanine::Graphics::Procedural::LookupModifier::LookupTexture
protected

A pointer to the image to use for pixel lookups.

Definition at line 90 of file lookupmodifier.h.


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