A modifier that will use a mask image to set the alpha channels of a source image. More...
#include <alphamaskmodifier.h>
Public Member Functions | |
AlphaMaskModifier () | |
Blank constructor. | |
virtual | ~AlphaMaskModifier () |
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... | |
AlphaMaskModifier & | SetColourMask (const Boole UseColour) |
Sets whether or not the colour of the mask will be used instead of the intensity. More... | |
AlphaMaskModifier & | SetMaskTexture (TextureBuffer *Mask) |
Sets the texture that will be used as the mask. More... | |
Public Member Functions inherited from Mezzanine::Graphics::Procedural::TextureModifier | |
TextureModifier () | |
Blank constructor. | |
virtual | ~TextureModifier () |
Class destructor. | |
Protected Attributes | |
Boole | ColourMask |
Whether or not to use normalized colours from the mask for calculating the alpha channel, instead of the intensity. More... | |
TextureBuffer * | MaskTexture |
A pointer to the texture to use as the Alpha Mask. More... | |
A modifier that will use a mask image to set the alpha channels of a source image.
Depending on how the members are configured, an AlphaMaskModifier can operate in one of three modes:
Mode 1 is accomplished by leaving or setting the MaskTexture member to NULL, regardless of the ColourMask member. Mode 2 is accomplished by setting the MaskTexture member to a valid texture and leaving or setting the ColourMask member to false. Mode 3 is accomplished by setting the MaskTexture member to a valid texture and setting the ColourMask member to true.
Definition at line 85 of file alphamaskmodifier.h.
|
virtual |
Gets the name of this modifier.
Implements Mezzanine::Graphics::Procedural::TextureModifier.
Definition at line 137 of file alphamaskmodifier.cpp.
|
virtual |
Alters the generated pixels in a TextureBuffer.
Buffer | The buffer to be modified. |
The | MaskTexture 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 92 of file alphamaskmodifier.cpp.
AlphaMaskModifier & Mezzanine::Graphics::Procedural::AlphaMaskModifier::SetColourMask | ( | const Boole | UseColour | ) |
Sets whether or not the colour of the mask will be used instead of the intensity.
UseColour | Whether or not to use normalized colours from the mask for calculating the alpha channel, instead of the intensity. Initial Value: False. |
Definition at line 146 of file alphamaskmodifier.cpp.
AlphaMaskModifier & Mezzanine::Graphics::Procedural::AlphaMaskModifier::SetMaskTexture | ( | TextureBuffer * | Mask | ) |
Sets the texture that will be used as the mask.
Mask | A pointer to the texture to use as the Alpha Mask. Initial Value: NULL. |
Definition at line 143 of file alphamaskmodifier.cpp.
|
protected |
Whether or not to use normalized colours from the mask for calculating the alpha channel, instead of the intensity.
Definition at line 93 of file alphamaskmodifier.h.
|
protected |
A pointer to the texture to use as the Alpha Mask.
Definition at line 90 of file alphamaskmodifier.h.